MCPcopy Create free account
hub / github.com/Meituan-Dianping/SQLAdvisor / Lookup

Method Lookup

extra/yassl/src/yassl_int.cpp:1874–1887  ·  view source on GitHub ↗

lookup self error code

Source from the content-addressed store, hash-verified

1872
1873// lookup self error code
1874int Errors::Lookup(bool peek)
1875{
1876 Lock guard(mutex_);
1877 thr_iterator find = STL::find_if(list_.begin(), list_.end(),
1878 thr_match());
1879 if (find != list_.end()) {
1880 int ret = find->errorID_;
1881 if (!peek)
1882 list_.erase(find);
1883 return ret;
1884 }
1885 else
1886 return 0;
1887}
1888
1889
1890// add a new error code for self

Callers 1

err_helperFunction · 0.80

Calls 5

find_ifFunction · 0.85
thr_matchClass · 0.85
beginMethod · 0.45
endMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected