refactor: player construct

This commit is contained in:
2025-04-08 22:35:40 +02:00
parent b4277e9261
commit 858b7d81cc
7 changed files with 49 additions and 114 deletions
+5 -2
View File
@@ -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);