MCPcopy Create free account
hub / github.com/ComodoSecurity/openedr / removeMember

Method removeMember

edrav2/eprj/jsoncpp/src/lib_json/json_value.cpp:1223–1240  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1221}
1222
1223bool Value::removeMember(const char* begin, const char* end, Value* removed) {
1224 if (type_ != objectValue) {
1225 return false;
1226 }
1227 CZString actualKey(begin, static_cast<unsigned>(end - begin),
1228 CZString::noDuplication);
1229 auto it = value_.map_->find(actualKey);
1230 if (it == value_.map_->end())
1231 return false;
1232 if (removed)
1233#if JSON_HAS_RVALUE_REFERENCES
1234 *removed = std::move(it->second);
1235#else
1236 *removed = it->second;
1237#endif
1238 value_.map_->erase(it);
1239 return true;
1240}
1241bool Value::removeMember(const char* key, Value* removed) {
1242 return removeMember(key, key + strlen(key), removed);
1243}

Callers 1

JSONTEST_FIXTUREFunction · 0.80

Calls 8

strlenFunction · 0.85
moveFunction · 0.50
findMethod · 0.45
endMethod · 0.45
eraseMethod · 0.45
dataMethod · 0.45
lengthMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected