aports/main/nodejs/node_snapshotable.patch
2025-10-26 15:36:03 +01:00

18 lines
732 B
Diff

From: Johannes Müller <50362-jogemu@users.gitlab.alpinelinux.org>
Date: Wed, 24 Sep 2025 23:06:15 +0200
Subject: Initialize as string_view
Initialize as string_view to allow pass-by-reference to prevent error: cannot bind non-const lvalue reference of type 'std::basic_string_view<char>&' to an rvalue of type 'std::__cxx11::basic_string<char>::__sv_type' {aka 'std::basic_string_view<char>'}
--- a/src/node_snapshotable.cc
+++ b/src/node_snapshotable.cc
@@ -934,7 +934,7 @@
return std::nullopt;
}
if (key == "builder") {
- std::string builder_path;
+ std::string_view builder_path;
if (field.value().get_string().get(builder_path) ||
builder_path.empty()) {
FPrintF(stderr,