Skip to content

Commit f2c62a9

Browse files
committed
core: use faster value to string function
1 parent 26ff376 commit f2c62a9

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
@@ -338,9 +338,11 @@ std::string LibmavReceiver::libmav_message_to_json(const mav::Message& msg) cons
338338
if (variant_opt) {
339339
const auto& variant = variant_opt.value();
340340

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

0 commit comments

Comments
 (0)