mirror of
https://github.com/ToruNiina/toml11.git
synced 2024-11-08 22:00:07 +00:00
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:
parent
1dc09d0332
commit
21732fce45
@ -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());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user