diff options
author | Sam Roberts <vieuxtech@gmail.com> | 2019-05-22 22:12:36 +0300 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2019-05-26 18:09:45 +0300 |
commit | 02f9a0fe27a70062631a39971099e13f54d2b588 (patch) | |
tree | 17561268145e62e01e8cdb0f8a4c5d4f9b204af9 /src/node_internals.h | |
parent | 91ec5bf7ba78039b6ab856c87aa39e3b7ef77c7e (diff) |
src: move DiagnosticFilename inlines into a -inl.h
DiagnosticFilename's constructor default values use inlines from
env-inl.h, causing the many users of node_internals.h to include
env-inl.h, even if they never use DiagnosticFilename.
PR-URL: https://github.com/nodejs/node/pull/27839
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Diffstat (limited to 'src/node_internals.h')
-rw-r--r-- | src/node_internals.h | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/node_internals.h b/src/node_internals.h index f74e67ce6f0..4091c3f0d31 100644 --- a/src/node_internals.h +++ b/src/node_internals.h @@ -321,17 +321,15 @@ class DiagnosticFilename { public: static void LocalTime(TIME_TYPE* tm_struct); - DiagnosticFilename(Environment* env, - const char* prefix, - const char* ext) : - filename_(MakeFilename(env->thread_id(), prefix, ext)) {} + inline DiagnosticFilename(Environment* env, + const char* prefix, + const char* ext); - DiagnosticFilename(uint64_t thread_id, - const char* prefix, - const char* ext) : - filename_(MakeFilename(thread_id, prefix, ext)) {} + inline DiagnosticFilename(uint64_t thread_id, + const char* prefix, + const char* ext); - const char* operator*() const { return filename_.c_str(); } + inline const char* operator*() const; private: static std::string MakeFilename( |