diff options
author | Anna Henningsen <anna@addaleax.net> | 2018-12-15 00:46:14 +0300 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2018-12-17 07:21:45 +0300 |
commit | 18f2bf7f9bd183f7baf08a705035fc99580a2c40 (patch) | |
tree | fbe758d9df8a7b5d32d6c0b05b7791dd45b457d3 /src/node_file.cc | |
parent | 52ee55a06b9c8842045d6fb3b95f06939cc79078 (diff) |
src: mark some global state as const
Mark some global variables as `const` or `constexpr`.
PR-URL: https://github.com/nodejs/node/pull/25052
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'src/node_file.cc')
-rw-r--r-- | src/node_file.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/node_file.cc b/src/node_file.cc index 49d31672948..b66c0fe6d20 100644 --- a/src/node_file.cc +++ b/src/node_file.cc @@ -81,9 +81,9 @@ using v8::Value; #endif #ifdef __POSIX__ -const char* kPathSeparator = "/"; +constexpr char kPathSeparator = '/'; #else -const char* kPathSeparator = "\\/"; +const char* const kPathSeparator = "\\/"; #endif #define GET_OFFSET(a) ((a)->IsNumber() ? (a).As<Integer>()->Value() : -1) |