mirror of
https://github.com/ToruNiina/toml11.git
synced 2025-09-17 09:08:08 +08:00
fix: #229 do not move temporary object
This commit is contained in:
@@ -2582,7 +2582,7 @@ basic_value<Comment, Table, Array> parse(const std::filesystem::path& fpath)
|
|||||||
"toml::parse: Error opening file \"" + fpath.string() + "\"");
|
"toml::parse: Error opening file \"" + fpath.string() + "\"");
|
||||||
}
|
}
|
||||||
ifs.exceptions(std::ifstream::failbit | std::ifstream::badbit);
|
ifs.exceptions(std::ifstream::failbit | std::ifstream::badbit);
|
||||||
return parse<Comment, Table, Array>(ifs, std::move(fpath.string()));
|
return parse<Comment, Table, Array>(ifs, fpath.string());
|
||||||
}
|
}
|
||||||
#endif // TOML11_HAS_STD_FILESYSTEM
|
#endif // TOML11_HAS_STD_FILESYSTEM
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user