File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -45,13 +45,15 @@ namespace SharedUtil
45
45
//
46
46
// CFastHashSet helpers
47
47
//
48
+
49
+ // Return true if the insertion took place
48
50
template <class T , class T2 >
49
- void MapInsert (CFastHashSet<T>& collection, const T2& item)
51
+ bool MapInsert (CFastHashSet<T>& collection, const T2& item)
50
52
{
51
- collection.insert (item);
53
+ return std::get< bool >( collection.insert (item) );
52
54
}
53
55
54
- // Remove key from collection
56
+ // Return true if the remove took place
55
57
template <class T , class T2 >
56
58
bool MapRemove (CFastHashSet<T>& collection, const T2& key)
57
59
{
Original file line number Diff line number Diff line change @@ -203,11 +203,11 @@ namespace SharedUtil
203
203
// std::set helpers
204
204
//
205
205
206
- // Update or add an item
206
+ // Return true if the insertion took place
207
207
template <class T , class TR , class T2 >
208
- void MapInsert (std::set<T, TR>& collection, const T2& item)
208
+ bool MapInsert (std::set<T, TR>& collection, const T2& item)
209
209
{
210
- collection.insert (item);
210
+ return std::get< bool >( collection.insert (item) );
211
211
}
212
212
213
213
} // namespace SharedUtil
You can’t perform that action at this time.
0 commit comments