GeezerVison is showing github.com — src: remove `std::array` overload of `FIXED_ONE_BYTE_STRING` · nodejs/node@03116a7
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: src/node_os.cc +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -259,7 +259,7 @@ static void GetInterfaceAddresses(const FunctionCallbackInfo<Value>& args) { |
259 | 259 | result.emplace_back(OneByteString(isolate, ip)); |
260 | 260 | result.emplace_back(OneByteString(isolate, netmask)); |
261 | 261 | result.emplace_back(family); |
262 | | - result.emplace_back(FIXED_ONE_BYTE_STRING(isolate, mac)); |
| 262 | + result.emplace_back(OneByteString(isolate, mac.data(), mac.size() - 1)); |
263 | 263 | result.emplace_back( |
264 | 264 | Boolean::New(env->isolate(), interfaces[i].is_internal)); |
265 | 265 | if (interfaces[i].address.address4.sin_family == AF_INET6) { |
|
Collapse file
Copy file name to clipboardExpand all lines: src/util.h -8Lines changed: 0 additions & 8 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -356,14 +356,6 @@ inline v8::Local<v8::String> FIXED_ONE_BYTE_STRING(v8::Isolate* isolate, |
356 | 356 | return OneByteString(isolate, data, N - 1); |
357 | 357 | } |
358 | 358 |
|
359 | | -template <std::size_t N> |
360 | | - requires(N > 0) |
361 | | -inline v8::Local<v8::String> FIXED_ONE_BYTE_STRING( |
362 | | - v8::Isolate* isolate, const std::array<char, N>& arr) { |
363 | | - CHECK_EQ(arr[N - 1], '\0'); |
364 | | - return OneByteString(isolate, arr.data(), N - 1); |
365 | | -} |
366 | | - |
367 | 359 | // tolower() is locale-sensitive. Use ToLower() instead. |
368 | 360 | inline char ToLower(char c); |
369 | 361 | inline std::string ToLower(const std::string& in); |
|