mirror of
https://github.com/enduro2d/enduro2d.git
synced 2025-12-14 16:09:06 +07:00
json_utils: try_parse_value for unit<T>
This commit is contained in:
@@ -113,6 +113,13 @@ namespace e2d::json_utils
|
||||
v = math::numeric_cast<T>(root.GetFloat());
|
||||
return true;
|
||||
}
|
||||
|
||||
template < typename T, typename Tag >
|
||||
std::enable_if_t<
|
||||
std::is_arithmetic_v<T>, bool>
|
||||
try_parse_value(const rapidjson::Value& root, unit<T, Tag>& v) noexcept {
|
||||
return try_parse_value(root, v.value);
|
||||
}
|
||||
}
|
||||
|
||||
namespace e2d::json_utils
|
||||
|
||||
Reference in New Issue
Block a user