MCPcopy Create free account
hub / github.com/WolfireGames/overgrowth / validate

Method validate

Source/JSON/jsoncpp.cpp:1913–1928  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1911 valid_keys->insert("allowSpecialFloats");
1912}
1913bool CharReaderBuilder::validate(Json::Value* invalid) const {
1914 Json::Value my_invalid;
1915 if (!invalid) invalid = &my_invalid; // so we do not need to test for NULL
1916 Json::Value& inv = *invalid;
1917 std::set<std::string> valid_keys;
1918 getValidReaderKeys(&valid_keys);
1919 Value::Members keys = settings_.getMemberNames();
1920 size_t n = keys.size();
1921 for (size_t i = 0; i < n; ++i) {
1922 std::string const& key = keys[i];
1923 if (valid_keys.find(key) == valid_keys.end()) {
1924 inv[key] = settings_[key];
1925 }
1926 }
1927 return 0u == inv.size();
1928}
1929Value& CharReaderBuilder::operator[](std::string key) {
1930 return settings_[key];
1931}

Callers

nothing calls this directly

Calls 6

getValidReaderKeysFunction · 0.70
getValidWriterKeysFunction · 0.70
getMemberNamesMethod · 0.45
sizeMethod · 0.45
findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected