MCPcopy Create free account
hub / github.com/codereader/DarkRadiant / detach

Method detach

radiantcore/entity/KeyValue.cpp:42–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40}
41
42void KeyValue::detach(KeyObserver& observer, bool sendEmptyValue)
43{
44 // Send final empty value if requested
45 if (sendEmptyValue)
46 observer.onKeyValueChanged(_emptyValue);
47
48 // Remove the observer if present
49 auto found = std::find(_observers.begin(), _observers.end(), &observer);
50 if (found != _observers.end())
51 _observers.erase(found);
52}
53
54const std::string& KeyValue::get() const
55{

Callers 4

~NameKeyObserverMethod · 0.45
detachObserverMethod · 0.45
onKeyEraseMethod · 0.45
~KeyValueObserverMethod · 0.45

Calls 5

findFunction · 0.50
onKeyValueChangedMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected