mirror of
https://github.com/ToruNiina/toml11.git
synced 2024-11-29 15:41:03 +00:00
refactor: use as_* to avoid needless checking
This commit is contained in:
parent
65124a8d2e
commit
4dbd2cb9fe
@ -468,8 +468,7 @@ struct serializer
|
||||
bool is_array_of_tables(const value& v) const
|
||||
{
|
||||
if(!v.is_array()) {return false;}
|
||||
|
||||
const auto& a = v.cast<value_t::Array>();
|
||||
const auto& a = v.as_array();
|
||||
return !a.empty() && a.front().is_table();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user