* Remove a label occurrence from the cache * * Removes the label completely if this was the _last_ occurence. * * @param label some label */
| 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 |
no test coverage detected