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

Method validate

Libraries/jsoncpp-0.y.z/src/lib_json/json_reader.cpp:1775–1791  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1773 valid_keys->insert("allowSpecialFloats");
1774}
1775bool CharReaderBuilder::validate(Json::Value* invalid) const
1776{
1777 Json::Value my_invalid;
1778 if (!invalid) invalid = &my_invalid; // so we do not need to test for NULL
1779 Json::Value& inv = *invalid;
1780 std::set<std::string> valid_keys;
1781 getValidReaderKeys(&valid_keys);
1782 Value::Members keys = settings_.getMemberNames();
1783 size_t n = keys.size();
1784 for (size_t i = 0; i < n; ++i) {
1785 std::string const& key = keys[i];
1786 if (valid_keys.find(key) == valid_keys.end()) {
1787 inv[key] = settings_[key];
1788 }
1789 }
1790 return 0u == inv.size();
1791}
1792Value& CharReaderBuilder::operator[](std::string key)
1793{
1794 return settings_[key];

Callers 5

JSONTEST_FIXTUREFunction · 0.45
FT_TrueTypeGX_ValidateFunction · 0.45
FT_ClassicKern_ValidateFunction · 0.45
FT_OpenType_ValidateFunction · 0.45
tt_face_build_cmapsFunction · 0.45

Calls 5

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

Tested by

no test coverage detected