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

Method inc

lib_acl_cpp/src/stdlib/class_counter.cpp:33–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31}
32
33void class_counter::inc(const char *name) {
34 if (lock_) {
35 lock_->lock();
36 }
37
38 std::map<std::string, long long>::iterator it = names_.find(name);
39 if (it == names_.end()) {
40 names_[name] = 1;
41 } else {
42 it->second++;
43 }
44
45 if (lock_) {
46 lock_->unlock();
47 }
48}
49
50void class_counter::dec(const char *name) {
51 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