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

Function lookup

extra/yassl/taocrypt/test/memory.cpp:105–121  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

103
104
105bool lookup(alloc_node*& find, void* key, alloc_node*& prev)
106{
107 bool found(false);
108
109 while (find) {
110 if (find == key) {
111 found = true;
112 break;
113 }
114 prev = find;
115 if (key < find)
116 find = find->left_;
117 else
118 find = find->right_;
119 }
120 return found;
121}
122
123
124// iterative insert

Callers 2

insertFunction · 0.85
removeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected