From fb885b5c21348c8b389b898b66c5eb19eee6c9f8 Mon Sep 17 00:00:00 2001 From: Green Sky Date: Sat, 17 Feb 2024 23:04:34 +0100 Subject: [PATCH] simplify array cast a little --- src/fragment_store/message_serializer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fragment_store/message_serializer.cpp b/src/fragment_store/message_serializer.cpp index 78362e9..6bb7df0 100644 --- a/src/fragment_store/message_serializer.cpp +++ b/src/fragment_store/message_serializer.cpp @@ -36,7 +36,7 @@ bool MessageSerializerCallbacks::component_emplace_or_replace_json>(j.is_binary()?j:j["bytes"]); + const std::vector id = j.is_binary()?j:j["bytes"]; // TODO: id lookup table, this is very inefficent for (const auto& [c_it, id_it] : msc.cr.view().each()) { @@ -79,7 +79,7 @@ bool MessageSerializerCallbacks::component_emplace_or_replace_json>(j.is_binary()?j:j["bytes"]); + const std::vector id = j.is_binary()?j:j["bytes"]; // TODO: id lookup table, this is very inefficent for (const auto& [c_it, id_it] : msc.cr.view().each()) {