Skip to content

Commit fc19f8f

Browse files
committed
clean up
1 parent ece0aaa commit fc19f8f

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

include/phtree/common/flat_sparse_map.h

-20
Original file line numberDiff line numberDiff line change
@@ -112,11 +112,6 @@ class sparse_map {
112112
return try_emplace_base(iter, key, std::forward<Args>(args)...);
113113
}
114114

115-
template <typename... Args>
116-
auto try_emplace(iterator iter, size_t key, Args&&... args) {
117-
return try_emplace_base(iter, key, std::forward<Args>(args)...);
118-
}
119-
120115
void erase(KeyT key) {
121116
auto it = lower_bound(key);
122117
if (it != end() && it->first == key) {
@@ -157,21 +152,6 @@ class sparse_map {
157152
}
158153
}
159154

160-
// TODO merge with above
161-
template <typename... Args>
162-
auto try_emplace_base(const iterator& it, KeyT key, Args&&... args) {
163-
if (it != end() && it->first == key) {
164-
return std::make_pair(it, false);
165-
} else {
166-
auto x = data_.emplace(
167-
it,
168-
std::piecewise_construct,
169-
std::forward_as_tuple(key),
170-
std::forward_as_tuple(std::forward<Args>(args)...));
171-
return std::make_pair(x, true);
172-
}
173-
}
174-
175155
std::vector<Entry> data_;
176156
};
177157

0 commit comments

Comments
 (0)