forked from Green-Sky/tomato
simplify array cast a little
This commit is contained in:
parent
527a7c63f6
commit
fb885b5c21
@ -36,7 +36,7 @@ bool MessageSerializerCallbacks::component_emplace_or_replace_json<Message::Comp
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto id = static_cast<std::vector<uint8_t>>(j.is_binary()?j:j["bytes"]);
|
const std::vector<uint8_t> id = j.is_binary()?j:j["bytes"];
|
||||||
|
|
||||||
// TODO: id lookup table, this is very inefficent
|
// TODO: id lookup table, this is very inefficent
|
||||||
for (const auto& [c_it, id_it] : msc.cr.view<Contact::Components::ID>().each()) {
|
for (const auto& [c_it, id_it] : msc.cr.view<Contact::Components::ID>().each()) {
|
||||||
@ -79,7 +79,7 @@ bool MessageSerializerCallbacks::component_emplace_or_replace_json<Message::Comp
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto id = static_cast<std::vector<uint8_t>>(j.is_binary()?j:j["bytes"]);
|
const std::vector<uint8_t> id = j.is_binary()?j:j["bytes"];
|
||||||
|
|
||||||
// TODO: id lookup table, this is very inefficent
|
// TODO: id lookup table, this is very inefficent
|
||||||
for (const auto& [c_it, id_it] : msc.cr.view<Contact::Components::ID>().each()) {
|
for (const auto& [c_it, id_it] : msc.cr.view<Contact::Components::ID>().each()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user