Skip to content

Commit

Permalink
src: remove separate definitions for static constexpr members
Browse files Browse the repository at this point in the history
This is no longer necessary (and actually deprecated) since C++17.

PR-URL: #41755
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Mestery <mestery@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
  • Loading branch information
addaleax authored and bengl committed Feb 21, 2022
1 parent abd6967 commit eeb3a68
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 19 deletions.
3 changes: 0 additions & 3 deletions src/async_wrap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,6 @@ void AsyncWrap::EmitAfter(Environment* env, double async_id) {
env->async_hooks_after_function());
}

// TODO(addaleax): Remove once we're on C++17.
constexpr double AsyncWrap::kInvalidAsyncId;

static void SetupHooks(const FunctionCallbackInfo<Value>& args) {
Environment* env = Environment::GetCurrent(args);

Expand Down
2 changes: 0 additions & 2 deletions src/node_blob.cc
Original file line number Diff line number Diff line change
Expand Up @@ -482,8 +482,6 @@ InternalFieldInfo* BlobBindingData::Serialize(int index) {
return info;
}

constexpr FastStringKey BlobBindingData::type_name;

void Blob::RegisterExternalReferences(ExternalReferenceRegistry* registry) {
registry->Register(Blob::New);
registry->Register(Blob::ToArrayBuffer);
Expand Down
3 changes: 0 additions & 3 deletions src/node_file.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2449,9 +2449,6 @@ InternalFieldInfo* BindingData::Serialize(int index) {
return info;
}

// TODO(addaleax): Remove once we're on C++17.
constexpr FastStringKey BindingData::type_name;

void Initialize(Local<Object> target,
Local<Value> unused,
Local<Context> context,
Expand Down
3 changes: 0 additions & 3 deletions src/node_http2.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3135,9 +3135,6 @@ void Http2State::MemoryInfo(MemoryTracker* tracker) const {
tracker->TrackField("root_buffer", root_buffer);
}

// TODO(addaleax): Remove once we're on C++17.
constexpr FastStringKey Http2State::type_name;

// Set up the process.binding('http2') binding.
void Initialize(Local<Object> target,
Local<Value> unused,
Expand Down
3 changes: 0 additions & 3 deletions src/node_http_parser.cc
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,6 @@ class BindingData : public BaseObject {
SET_MEMORY_INFO_NAME(BindingData)
};

// TODO(addaleax): Remove once we're on C++17.
constexpr FastStringKey BindingData::type_name;

// helper class for the Parser
struct StringPtr {
StringPtr() {
Expand Down
2 changes: 0 additions & 2 deletions src/node_process_methods.cc
Original file line number Diff line number Diff line change
Expand Up @@ -448,8 +448,6 @@ static void ReallyExit(const FunctionCallbackInfo<Value>& args) {

namespace process {

constexpr FastStringKey BindingData::type_name;

BindingData::BindingData(Environment* env, v8::Local<v8::Object> object)
: SnapshotableObject(env, object, type_int) {
Local<ArrayBuffer> ab = ArrayBuffer::New(env->isolate(), kBufferSize);
Expand Down
3 changes: 0 additions & 3 deletions src/node_v8.cc
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,6 @@ void BindingData::MemoryInfo(MemoryTracker* tracker) const {
heap_code_statistics_buffer);
}

// TODO(addaleax): Remove once we're on C++17.
constexpr FastStringKey BindingData::type_name;

void CachedDataVersionTag(const FunctionCallbackInfo<Value>& args) {
Environment* env = Environment::GetCurrent(args);
Local<Integer> result =
Expand Down

0 comments on commit eeb3a68

Please sign in to comment.