Skip to content

Commit

Permalink
fix compilation (older compilers)
Browse files Browse the repository at this point in the history
  • Loading branch information
facontidavide committed Apr 9, 2024
1 parent 5ddfa8e commit e4f678b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions plotjuggler_plugins/ParserLineInflux/line_parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 += '/';
Expand All @@ -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")
Expand Down

0 comments on commit e4f678b

Please sign in to comment.