From a94368cc8744ed5cbddfe69f3eb41b0f3cdc35b1 Mon Sep 17 00:00:00 2001 From: Siarhei Fedartsou Date: Sat, 2 Nov 2024 11:24:19 +0100 Subject: [PATCH] Use std::string_view for key type in json::Object --- include/util/json_deep_compare.hpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/include/util/json_deep_compare.hpp b/include/util/json_deep_compare.hpp index d57f9cde1..438386e79 100644 --- a/include/util/json_deep_compare.hpp +++ b/include/util/json_deep_compare.hpp @@ -81,10 +81,11 @@ struct Comparator const auto &rhs_child = rhs.values.find(key)->second; const auto &lhs_child = lhs.values.find(key)->second; - auto is_same = - std::visit(Comparator(reason, lhs_path + "." + std::string(key), rhs_path + "." + std::string(key)), - lhs_child, - rhs_child); + auto is_same = std::visit(Comparator(reason, + lhs_path + "." + std::string(key), + rhs_path + "." + std::string(key)), + lhs_child, + rhs_child); if (!is_same) { return false;