MCPcopy Create free account
hub / github.com/ValveSoftware/Proton / validate

Method validate

vrclient_x64/jsoncpp.cpp:2151–2167  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2149 valid_keys->insert("allowSpecialFloats");
2150}
2151bool CharReaderBuilder::validate(Json::Value* invalid) const
2152{
2153 Json::Value my_invalid;
2154 if (!invalid) invalid = &my_invalid; // so we do not need to test for NULL
2155 Json::Value& inv = *invalid;
2156 std::set<std::string> valid_keys;
2157 getValidReaderKeys(&valid_keys);
2158 Value::Members keys = settings_.getMemberNames();
2159 size_t n = keys.size();
2160 for (size_t i = 0; i < n; ++i) {
2161 std::string const& key = keys[i];
2162 if (valid_keys.find(key) == valid_keys.end()) {
2163 inv[key] = settings_[key];
2164 }
2165 }
2166 return 0u == inv.size();
2167}
2168Value& CharReaderBuilder::operator[](std::string key)
2169{
2170 return settings_[key];

Callers

nothing calls this directly

Calls 6

getValidReaderKeysFunction · 0.85
getValidWriterKeysFunction · 0.85
getMemberNamesMethod · 0.80
sizeMethod · 0.80
findMethod · 0.80
endMethod · 0.80

Tested by

no test coverage detected