Resolve g++ warning: free-nonheap-object

As described in issue #173, this warning is raised on various platforms
and in various build types. For example, g++ 11 in release mode will
cause this warning to be raised. This change fixes this warning.
This commit is contained in:
Louis R. Marascio 2021-12-01 14:43:43 -06:00
parent 1dc09d0332
commit 21732fce45

View File

@ -2134,7 +2134,7 @@ result<Value, std::string> parse_toml_file(location& loc)
table_type data;
// root object is also a table, but without [tablename]
if(auto tab = parse_ml_table<value_type>(loc))
if(const auto tab = parse_ml_table<value_type>(loc))
{
data = std::move(tab.unwrap());
}