mirror of
https://github.com/ToruNiina/toml11.git
synced 2025-09-18 02:08:09 +08:00
refactor: use as_* to avoid needless checking
This commit is contained in:
@@ -468,8 +468,7 @@ struct serializer
|
|||||||
bool is_array_of_tables(const value& v) const
|
bool is_array_of_tables(const value& v) const
|
||||||
{
|
{
|
||||||
if(!v.is_array()) {return false;}
|
if(!v.is_array()) {return false;}
|
||||||
|
const auto& a = v.as_array();
|
||||||
const auto& a = v.cast<value_t::Array>();
|
|
||||||
return !a.empty() && a.front().is_table();
|
return !a.empty() && a.front().is_table();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user