From 18f84088b4703f7042cd9f17e53e56300075b054 Mon Sep 17 00:00:00 2001 From: ToruNiina Date: Thu, 19 Dec 2019 22:13:47 +0900 Subject: [PATCH] perf: avoid tmp str construction while checking --- toml/parser.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toml/parser.hpp b/toml/parser.hpp index 1ea650f..7cf644a 100644 --- a/toml/parser.hpp +++ b/toml/parser.hpp @@ -1356,7 +1356,7 @@ insert_nested_key(typename Value::table_type& root, const Value& v, { // here, if the value is a (multi-line) table, the region // should be something like `[table-name]`. - if(get_region(tab->at(k)).str().front() == '{') + if(get_region(tab->at(k)).front() == '{') { throw syntax_error(format_underline(concat_to_string( "toml::insert_value: inserting to an inline table (",