refactor: player construct
This commit is contained in:
@@ -21,19 +21,22 @@
|
||||
*/
|
||||
void SPITObject::clearUnconfirmedSPITObjects(SpitRepo<SPITObject> &repo) {
|
||||
auto &entries = repo.getRepo();
|
||||
for (auto i = entries.begin(); i != entries.end(); i++) {
|
||||
for (auto i = entries.begin(); i != entries.end();) {
|
||||
SPITObject *ptrSPITObject = i->second.get();
|
||||
if (ptrSPITObject->getCreatedByClient() == false && ptrSPITObject->getConfirmed() == false) {
|
||||
i = entries.erase(i);
|
||||
} else {
|
||||
i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void SPITObject::eventProjectClosed(SpitRepo<SPITObject> &repo, SpitRepo<SPITObject> &remoteRepo) {
|
||||
auto &entries = repo.getRepo();
|
||||
for (auto i = entries.begin(); i != entries.end(); i++) {
|
||||
for (auto i = entries.begin(); i != entries.end(); ) {
|
||||
SPITObject *ptrSPITObject = i->second.get();
|
||||
if (ptrSPITObject->getCreatedByClient() == true) {
|
||||
i++;
|
||||
continue;
|
||||
}
|
||||
i = entries.erase(i);
|
||||
|
||||
Reference in New Issue
Block a user