From 120a8313d915c2ebac43c8bf0b8216b240e769c1 Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Tue, 30 Dec 2014 13:30:22 +0100 Subject: [PATCH] Small optimization in hashlib --- kernel/hashlib.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 */ -- 2.30.2