perf: avoid tmp str construction while checking

This commit is contained in:
ToruNiina
2019-12-19 22:13:47 +09:00
parent c199bd8b49
commit 18f84088b4

View File

@@ -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 (",