Clean up remote tracing code, add per-network remote trace settings, add remote trace level, and make local trace output readable again.

This commit is contained in:
Adam Ierymenko
2017-12-04 14:40:10 -08:00
parent c26bf45e28
commit 16613ab5fb
11 changed files with 474 additions and 248 deletions

View File

@ -255,6 +255,24 @@ public:
}
inline const V *get(const K &k) const { return const_cast<Hashtable *>(this)->get(k); }
/**
* @param k Key
* @param v Value to fill with result
* @return True if value was found and set (if false, v is not modified)
*/
inline bool get(const K &k,V &v) const
{
_Bucket *b = _t[_hc(k) % _bc];
while (b) {
if (b->k == k) {
v = b->v;
return true;
}
b = b->next;
}
return false;
}
/**
* @param k Key to check
* @return True if key is present