Skip to content

Commit 093c909

Browse files
committed
core: use faster value to string function
1 parent ca4db0b commit 093c909

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/mavsdk/core/libmav_receiver.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -339,9 +339,11 @@ std::string LibmavReceiver::libmav_message_to_json(const mav::Message& msg) cons
339339
if (variant_opt) {
340340
const auto& variant = variant_opt.value();
341341

342-
// Convert variant to JSON string using extracted function
342+
// Convert variant to JSON string using optimized function
343343
std::visit(
344-
[&json_stream](const auto& value) { value_to_json_stream(json_stream, value); },
344+
[&json_stream](const auto& value) {
345+
value_to_json_stream_fast(json_stream, value);
346+
},
345347
variant);
346348
} else {
347349
// Field not present or failed to extract

0 commit comments

Comments
 (0)