diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2022-05-31 20:46:19 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2022-05-31 20:46:19 +0000 |
commit | c699645c94125bb903e117d2904d378899df47a9 (patch) | |
tree | 02bfcb6531efe79ac8b965f98fa2a5441fb035be /eval | |
parent | f68838b632e8af9cad24568bd5354ed1db0aa685 (diff) |
Use std::to_chars to make a string out of a 64 bit number.
Diffstat (limited to 'eval')
-rw-r--r-- | eval/src/vespa/eval/instruction/generic_peek.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/eval/src/vespa/eval/instruction/generic_peek.cpp b/eval/src/vespa/eval/instruction/generic_peek.cpp index ccca0b4e458..ea6e53e5505 100644 --- a/eval/src/vespa/eval/instruction/generic_peek.cpp +++ b/eval/src/vespa/eval/instruction/generic_peek.cpp @@ -3,7 +3,6 @@ #include "generic_peek.h" #include <vespa/eval/eval/nested_loop.h> #include <vespa/eval/eval/wrap_param.h> -#include <vespa/vespalib/util/overload.h> #include <vespa/vespalib/util/stash.h> #include <vespa/vespalib/util/typify.h> #include <vespa/vespalib/util/visit_ranges.h> @@ -252,10 +251,12 @@ struct SparsePlan { SparseState make_state(const Getter &get_child_value) const { SmallVector<Handle> handles; SmallVector<string_id> view_addr; + char buf[24]; for (const auto & dim : lookup_specs) { if (dim.has_child()) { int64_t child_value = get_child_value(dim.get_child_idx()); - handles.emplace_back(vespalib::make_string("%" PRId64, child_value)); + auto res = std::to_chars(buf, buf + sizeof(buf), child_value, 10); + handles.emplace_back(vespalib::stringref(buf, res.ptr - buf)); view_addr.push_back(handles.back().id()); } else { view_addr.push_back(dim.get_label_name()); |