From e4f678ba0c4c9f8bf56843f4fed8cade4a79efaa Mon Sep 17 00:00:00 2001 From: Davide Faconti Date: Tue, 9 Apr 2024 16:31:08 +0200 Subject: [PATCH] fix compilation (older compilers) --- plotjuggler_plugins/ParserLineInflux/line_parser.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/plotjuggler_plugins/ParserLineInflux/line_parser.cpp b/plotjuggler_plugins/ParserLineInflux/line_parser.cpp index 912e82b28..4673789a2 100644 --- a/plotjuggler_plugins/ParserLineInflux/line_parser.cpp +++ b/plotjuggler_plugins/ParserLineInflux/line_parser.cpp @@ -58,7 +58,7 @@ class MsgParserImpl : public MessageParser { const auto field_parts = field.split('='); const auto name = field_parts[0].toLocal8Bit(); - auto value = field_parts[1]; + auto value = field_parts[1].toLocal8Bit(); key = prefix; key += '/'; @@ -67,8 +67,7 @@ class MsgParserImpl : public MessageParser if (value.startsWith('"') && value.endsWith('"')) { auto& data = _plot_data.getOrCreateStringSeries(key); - data.pushBack( - { ts_sec, std::string(ToChar(value.data() + 1), value.size() - 2) }); + data.pushBack({ ts_sec, StringRef(value.data() + 1, value.size() - 2) }); } else if (value == "t" || value == "T" || value == "true" || value == "True" || value == "TRUE")