summaryrefslogtreecommitdiff
path: root/klm/util
diff options
context:
space:
mode:
authorKenneth Heafield <github@kheafield.com>2011-11-03 20:08:43 +0000
committerKenneth Heafield <github@kheafield.com>2011-11-03 20:08:43 +0000
commit9b9d565a9300b3a2b80bbb952bbf88dd36860ce2 (patch)
treed2680e52e219e3faabe4e70a1835bbecf12b787d /klm/util
parentee9cd01805cb7f297c42bf7a513dbe09b50264e5 (diff)
Mostly minor changes like a missing header guard and bad documentation
Diffstat (limited to 'klm/util')
-rw-r--r--klm/util/probing_hash_table.hh4
1 files changed, 2 insertions, 2 deletions
diff --git a/klm/util/probing_hash_table.hh b/klm/util/probing_hash_table.hh
index 2ec342a6..8122d69c 100644
--- a/klm/util/probing_hash_table.hh
+++ b/klm/util/probing_hash_table.hh
@@ -61,14 +61,14 @@ template <class PackingT, class HashT, class EqualT = std::equal_to<typename Pac
#endif
{}
- template <class T> void Insert(const T &t) {
+ template <class T> MutableIterator Insert(const T &t) {
if (++entries_ >= buckets_)
UTIL_THROW(ProbingSizeException, "Hash table with " << buckets_ << " buckets is full.");
#ifdef DEBUG
assert(initialized_);
#endif
for (MutableIterator i(begin_ + (hash_(t.GetKey()) % buckets_));;) {
- if (equal_(i->GetKey(), invalid_)) { *i = t; return; }
+ if (equal_(i->GetKey(), invalid_)) { *i = t; return i; }
if (++i == end_) { i = begin_; }
}
}