MCPcopy Create free account
hub / github.com/catboost/catboost / UpdateImpl

Method UpdateImpl

library/cpp/cache/cache.h:611–621  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

609
610 template<typename TKeyRef, typename TValueRef>
611 void UpdateImpl(TKeyRef&& key, TValueRef&& value) {
612 if (MultiValue)
613 ythrow yexception() << "TCache: can't \"Update\" in multicache";
614 TIterator it = Find(key);
615 if (it != End()) {
616 Erase(it);
617 }
618 InsertImpl(std::forward<TKeyRef>(key), std::forward<TValueRef>(value));
619
620 Y_ASSERT(Index.size() == List.GetSize());
621 }
622
623 void Update(const TKey& key, const TValue& value) {
624 UpdateImpl(key, value);

Callers

nothing calls this directly

Calls 5

yexceptionClass · 0.85
EraseFunction · 0.85
FindFunction · 0.50
sizeMethod · 0.45
GetSizeMethod · 0.45

Tested by

no test coverage detected