Problems with lambdas and references

This commit is contained in:
Kayne Ruse
2014-11-26 03:05:40 +11:00
parent bd3838a04e
commit fdaae0e8f2
21 changed files with 70 additions and 26 deletions
+1 -1
View File
@@ -200,7 +200,7 @@ void AccountManager::UnloadAll() {
elementMap.clear();
}
void AccountManager::UnloadIf(std::function<bool(std::pair<const int, AccountData>)> fn) {
void AccountManager::UnloadIf(std::function<bool(std::pair<const int, AccountData>&)> fn) {
//replicate std::remove_if, using custom code
std::map<int, AccountData>::iterator it = elementMap.begin();
while (it != elementMap.end()) {