projects/aports·blob master · refs

17 lines · 732 B

1From: Johannes Müller <[email protected]>
2Date: Wed, 24 Sep 2025 23:06:15 +0200
3Subject: Initialize as string_view
4
5Initialize 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>'}
6
7--- a/src/node_snapshotable.cc
8+++ b/src/node_snapshotable.cc
9@@ -934,7 +934,7 @@
10 return std::nullopt;
11 }
12 if (key == "builder") {
13- std::string builder_path;
14+ std::string_view builder_path;
15 if (field.value().get_string().get(builder_path) ||
16 builder_path.empty()) {
17 FPrintF(stderr,