MCPcopy Create free account
hub / github.com/djcb/mu / decrease

Method decrease

lib/mu-labels-cache.hh:81–89  ·  view source on GitHub ↗

* Remove a label occurrence from the cache * * Removes the label completely if this was the _last_ occurence. * * @param label some label */

Source from the content-addressed store, hash-verified

79 * @param label some label
80 */
81 void decrease(const std::string& label) {
82 if (auto it = label_map_.find(label); it != label_map_.end()) {
83 if (it->second == 1)
84 label_map_.erase(it);
85 else
86 --it->second;
87 ++dirty_;
88 }
89 }
90
91 /**
92 * Update the cache with the label changes

Callers 2

remove_messageMethod · 0.80

Calls 1

endMethod · 0.45

Tested by

no test coverage detected