MCPcopy Create free account
hub / github.com/acl-dev/acl / dec

Method dec

lib_acl_cpp/src/stdlib/class_counter.cpp:50–67  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48}
49
50void class_counter::dec(const char *name) {
51 if (lock_) {
52 lock_->lock();
53 }
54
55 std::map<std::string, long long>::iterator it = names_.find(name);
56 if (it != names_.end()) {
57 if (--it->second == 0 && clean_) {
58 names_.erase(it);
59 }
60 } else {
61 logger_error("not find flag %s", name);
62 }
63
64 if (lock_) {
65 lock_->unlock();
66 }
67}
68
69long long class_counter::count(const char *name) {
70 if (lock_) {

Callers

nothing calls this directly

Calls 4

lockMethod · 0.45
findMethod · 0.45
endMethod · 0.45
unlockMethod · 0.45

Tested by

no test coverage detected