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
+2 -2
View File
@@ -175,10 +175,10 @@ void ServerApplication::Proc() {
int disconnected = clientMgr.CheckConnections();
if (disconnected != -1) {
//find and unload the accounts associated with this client
accountMgr.UnloadIf([&](std::pair<const int, AccountData> account) -> bool {
accountMgr.UnloadIf([&](std::pair<const int, AccountData>& account) -> bool {
if (account.second.GetClientIndex() == disconnected) {
//find and unload the characters associated with this account
characterMgr.UnloadIf([&](std::pair<const int, CharacterData> character) -> bool {
characterMgr.UnloadIf([&](std::pair<const int, CharacterData>& character) -> bool {
if (character.second.GetOwner() == account.first) {
// PumpCharacterUnload(character.first);
return true;