From 16613ab5fb5a1f6cb1271ae67e68836a1898023d Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Mon, 4 Dec 2017 14:40:10 -0800 Subject: Clean up remote tracing code, add per-network remote trace settings, add remote trace level, and make local trace output readable again. --- node/Hashtable.hpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'node/Hashtable.hpp') diff --git a/node/Hashtable.hpp b/node/Hashtable.hpp index e5496592..5aa045b9 100644 --- a/node/Hashtable.hpp +++ b/node/Hashtable.hpp @@ -255,6 +255,24 @@ public: } inline const V *get(const K &k) const { return const_cast(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 -- cgit v1.2.3