From: Clifford Wolf Date: Tue, 30 Dec 2014 12:30:22 +0000 (+0100) Subject: Small optimization in hashlib X-Git-Tag: yosys-0.5~177 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=120a8313d915c2ebac43c8bf0b8216b240e769c1;p=yosys.git Small optimization in hashlib --- diff --git a/kernel/hashlib.h b/kernel/hashlib.h index b02abfadd..c93e00a09 100644 --- a/kernel/hashlib.h +++ b/kernel/hashlib.h @@ -526,10 +526,10 @@ public: void clear() { hashtable.clear(); entries.clear(); init(); } iterator begin() { upd_begin_n(); return iterator(this, begin_n); } - iterator end() { return iterator(this, -1); } + iterator end() { return iterator(nullptr, -1); } const_iterator begin() const { ((dict*)this)->upd_begin_n(); return const_iterator(this, begin_n); } - const_iterator end() const { return const_iterator(this, -1); } + const_iterator end() const { return const_iterator(nullptr, -1); } }; template> @@ -891,10 +891,10 @@ public: void clear() { hashtable.clear(); entries.clear(); init(); } iterator begin() { upd_begin_n(); return iterator(this, begin_n); } - iterator end() { return iterator(this, -1); } + iterator end() { return iterator(nullptr, -1); } const_iterator begin() const { ((pool*)this)->upd_begin_n(); return const_iterator(this, begin_n); } - const_iterator end() const { return const_iterator(this, -1); } + const_iterator end() const { return const_iterator(nullptr, -1); } }; } /* namespace hashlib */