Skip to content

Commit eeb3a68

Browse files
addaleaxbengl
authored andcommitted
src: remove separate definitions for static constexpr members
This is no longer necessary (and actually deprecated) since C++17. PR-URL: #41755 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Mohammed Keyvanzadeh <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Mestery <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Darshan Sen <[email protected]>
1 parent abd6967 commit eeb3a68

7 files changed

+0
-19
lines changed

src/async_wrap.cc

-3
Original file line numberDiff line numberDiff line change
@@ -151,9 +151,6 @@ void AsyncWrap::EmitAfter(Environment* env, double async_id) {
151151
env->async_hooks_after_function());
152152
}
153153

154-
// TODO(addaleax): Remove once we're on C++17.
155-
constexpr double AsyncWrap::kInvalidAsyncId;
156-
157154
static void SetupHooks(const FunctionCallbackInfo<Value>& args) {
158155
Environment* env = Environment::GetCurrent(args);
159156

src/node_blob.cc

-2
Original file line numberDiff line numberDiff line change
@@ -482,8 +482,6 @@ InternalFieldInfo* BlobBindingData::Serialize(int index) {
482482
return info;
483483
}
484484

485-
constexpr FastStringKey BlobBindingData::type_name;
486-
487485
void Blob::RegisterExternalReferences(ExternalReferenceRegistry* registry) {
488486
registry->Register(Blob::New);
489487
registry->Register(Blob::ToArrayBuffer);

src/node_file.cc

-3
Original file line numberDiff line numberDiff line change
@@ -2449,9 +2449,6 @@ InternalFieldInfo* BindingData::Serialize(int index) {
24492449
return info;
24502450
}
24512451

2452-
// TODO(addaleax): Remove once we're on C++17.
2453-
constexpr FastStringKey BindingData::type_name;
2454-
24552452
void Initialize(Local<Object> target,
24562453
Local<Value> unused,
24572454
Local<Context> context,

src/node_http2.cc

-3
Original file line numberDiff line numberDiff line change
@@ -3135,9 +3135,6 @@ void Http2State::MemoryInfo(MemoryTracker* tracker) const {
31353135
tracker->TrackField("root_buffer", root_buffer);
31363136
}
31373137

3138-
// TODO(addaleax): Remove once we're on C++17.
3139-
constexpr FastStringKey Http2State::type_name;
3140-
31413138
// Set up the process.binding('http2') binding.
31423139
void Initialize(Local<Object> target,
31433140
Local<Value> unused,

src/node_http_parser.cc

-3
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,6 @@ class BindingData : public BaseObject {
107107
SET_MEMORY_INFO_NAME(BindingData)
108108
};
109109

110-
// TODO(addaleax): Remove once we're on C++17.
111-
constexpr FastStringKey BindingData::type_name;
112-
113110
// helper class for the Parser
114111
struct StringPtr {
115112
StringPtr() {

src/node_process_methods.cc

-2
Original file line numberDiff line numberDiff line change
@@ -448,8 +448,6 @@ static void ReallyExit(const FunctionCallbackInfo<Value>& args) {
448448

449449
namespace process {
450450

451-
constexpr FastStringKey BindingData::type_name;
452-
453451
BindingData::BindingData(Environment* env, v8::Local<v8::Object> object)
454452
: SnapshotableObject(env, object, type_int) {
455453
Local<ArrayBuffer> ab = ArrayBuffer::New(env->isolate(), kBufferSize);

src/node_v8.cc

-3
Original file line numberDiff line numberDiff line change
@@ -142,9 +142,6 @@ void BindingData::MemoryInfo(MemoryTracker* tracker) const {
142142
heap_code_statistics_buffer);
143143
}
144144

145-
// TODO(addaleax): Remove once we're on C++17.
146-
constexpr FastStringKey BindingData::type_name;
147-
148145
void CachedDataVersionTag(const FunctionCallbackInfo<Value>& args) {
149146
Environment* env = Environment::GetCurrent(args);
150147
Local<Integer> result =

0 commit comments

Comments
 (0)