MCPcopy Create free account
hub / github.com/0xShug0/audio.cpp / optional_string

Function optional_string

include/engine/framework/io/json.h:116–119  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

is_stringMethod · 0.80
findMethod · 0.45

Tested by

no test coverage detected