MCPcopy Create free account
hub / github.com/deathkiller/jazz2-native / removeMember

Method removeMember

Sources/Dependencies/jsoncpp/value.cpp:1319–1331  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1317#endif
1318
1319 bool Value::removeMember(const char* begin, const char* end, Value* removed) {
1320 if (type() != objectValue) {
1321 return false;
1322 }
1323 CZString actualKey(begin, static_cast<unsigned>(end - begin), CZString::noDuplication);
1324 auto it = value_.map_->find(actualKey);
1325 if (it == value_.map_->end())
1326 return false;
1327 if (removed)
1328 *removed = std::move(it->second);
1329 value_.map_->erase(it);
1330 return true;
1331 }
1332#ifdef JSONCPP_HAS_STRING_VIEW
1333 bool Value::removeMember(std::string_view key, Value* removed) {
1334 return removeMember(key.data(), key.data() + key.length(), removed);

Callers

nothing calls this directly

Calls 7

typeClass · 0.85
c_strMethod · 0.80
findMethod · 0.45
endMethod · 0.45
eraseMethod · 0.45
dataMethod · 0.45
lengthMethod · 0.45

Tested by

no test coverage detected