From 46ae2d250febf23f6cc1bf4b44d8029ece4fc398 Mon Sep 17 00:00:00 2001 From: Joseph Olabisi Date: Fri, 18 Apr 2025 22:19:49 +0100 Subject: [PATCH] nit --- include/simdjson/dom/array-inl.h | 4 ++-- include/simdjson/dom/object-inl.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/simdjson/dom/array-inl.h b/include/simdjson/dom/array-inl.h index 203478083..5f8654725 100644 --- a/include/simdjson/dom/array-inl.h +++ b/include/simdjson/dom/array-inl.h @@ -186,7 +186,7 @@ array::at_path_with_wildcard(std::string_view json_path) const noexcept { return std::vector{}; } - return std::vector{result.value()}; + return std::vector{std::move(result.value())}; } inline simdjson_result @@ -217,7 +217,7 @@ inline simdjson_result> array::get_values() const noexcept std::vector result = {}; for (auto element : *this) { - result.push_back(element); + result.emplace_back(element); } return result; diff --git a/include/simdjson/dom/object-inl.h b/include/simdjson/dom/object-inl.h index 27701b8a4..ce271d204 100644 --- a/include/simdjson/dom/object-inl.h +++ b/include/simdjson/dom/object-inl.h @@ -308,7 +308,7 @@ object::at_path_with_wildcard(std::string_view json_path) const noexcept { // JSON_PATH } } else { - std::vector result{this->at_path(json_path).value()}; + std::vector result{std::move(this->at_path(json_path).value())}; return result; }