mirror of
https://github.com/ToruNiina/toml11.git
synced 2024-11-23 12:50:06 +00:00
test: use find instead of get<T>(v.at(""))
This commit is contained in:
parent
296ba060ef
commit
ad3c1950f2
@ -20,7 +20,7 @@ BOOST_AUTO_TEST_CASE(test_example)
|
||||
|
||||
auto serialized = toml::parse("tmp1.toml");
|
||||
{
|
||||
auto& owner = toml::get<toml::table>(serialized.at("owner"));
|
||||
auto& owner = toml::find<toml::table>(serialized, "owner");
|
||||
auto& bio = toml::get<std::string>(owner.at("bio"));
|
||||
const auto CR = std::find(bio.begin(), bio.end(), '\r');
|
||||
if(CR != bio.end())
|
||||
|
Loading…
Reference in New Issue
Block a user