| 114 | } |
| 115 | |
| 116 | inline float optional_f32(const Value & object, const std::string & key, float default_value) { |
| 117 | const auto * value = object.find(key); |
| 118 | return value != nullptr && value->is_number() ? value->as_f32() : default_value; |
| 119 | } |
| 120 | |
| 121 | inline float optional_nullable_f32(const Value & object, const std::string & key, float default_value) { |
| 122 | const auto * value = object.find(key); |