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

Method count

lib_acl_cpp/src/stdlib/class_counter.cpp:69–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

67}
68
69long long class_counter::count(const char *name) {
70 if (lock_) {
71 lock_->lock();
72 }
73
74 long long ret;
75
76 std::map<std::string, long long>::const_iterator it = names_.find(name);
77 if (it == names_.end()) {
78 ret = 0;
79 } else {
80 ret = it->second;
81 }
82
83 if (lock_) {
84 lock_->unlock();
85 }
86 return ret;
87}
88
89void class_counter::print(const char *flag) {
90 string buf(2048);

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