rodecomp/Source/Contents/Async/AsyncWorkRecycleObjectPoolMgr.cpp
ragnarok-clanker 4a0d90c1f2 Decompile 12 functions in Source/Contents/Async/AsyncWorkMgr.cpp, Source/Contents/Async/AsyncWorkRecycleObjectPoolMgr.cpp
Batch #17834 by eAthena: 11 byte-identical, 1 confirmed by peer review.

- fn_02499 CAsyncWorkMgr::LoadAccount: byte-identical
- fn_02500 CAsyncWorkMgr::SaveAccount: byte-identical
- fn_02501 CAsyncWorkMgr::ChangePartyMaster: byte-identical
- fn_02502 CAsyncWorkMgr::LoadCharacter: byte-identical
- fn_02503 CAsyncWorkMgr::SaveCharacter: byte-identical
- fn_02504 CAsyncWorkMgr::DownloadEmblem: byte-identical
- fn_02505 CAsyncWorkMgr::UploadEmblem: byte-identical
- fn_02506 CAsyncWorkMgr::LoadMyParty: byte-identical
- fn_02507 CAsyncWorkMgr::LoadPartyInfo: byte-identical
- fn_02509 CAsyncWorkMgr::LoadStore: byte-identical
- fn_02512 CAsyncWorkMgr::StopRecruiting: byte-identical
- fn_02566 CAsyncWorkRecycleObjectPoolMgr::RegisterPools: logic confirmed by peer review

Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
2026-11-12 04:18:08 +00:00

80 lines
3.7 KiB
C++

#include "Contents/UserData/AccountLinkedUserDataLoadAsyncWork.h"
#include "Contents/UserData/AccountLinkedUserDataSaveAsyncWork.h"
#include "Contents/Async/AsyncWorkRecycleObjectPoolMgr.h"
#include "Contents/Party/ChangePartyMasterAsyncWork.h"
#include "Contents/UserData/CharacterLinkedUserDataLoadAsyncWork.h"
#include "Contents/UserData/CharacterLinkedUserDataSaveAsyncWork.h"
#include "Contents/Emblems/EmblemDataDownloadAsyncWork.h"
#include "Contents/Emblems/EmblemDataUploadAsyncWork.h"
#include "Contents/Party/LoadMyPartyAsyncWork.h"
#include "Contents/Party/LoadPartyInfoAsyncWork.h"
#include "Contents/Party/LoadPartyListAsyncWork.h"
#include "Contents/Store/MCStoreInfoBackupAsyncWork.h"
#include "Contents/Party/RegisterPartyAsyncWork.h"
#include "Contents/Party/StopRecruitingAsyncWork.h"
#include <utility>
#include <new>
// OFFSET: 0x00576660
// FUNCTION: fn_02531
CAsyncWorkRecycleObjectPoolMgr::CAsyncWorkRecycleObjectPoolMgr() : m_registered(false) {
if (this->RegisterPools()) {
this->m_registered = true;
}
}
// INLINED
CAsyncWorkRecycleObjectPoolMgr::~CAsyncWorkRecycleObjectPoolMgr() {
for (const auto& entry : this->m_pools) {
delete entry.second;
}
}
// OFFSET: 0x00578F30
// FUNCTION: fn_02566
bool CAsyncWorkRecycleObjectPoolMgr::RegisterPools() {
if (!this->m_pools.insert(std::make_pair(g_accountLinkedUserDataLoadPoolName, new (std::nothrow) NRecycleObjectPool<CAccountLinkedUserDataLoadAsyncWork>(2))).second) {
return false;
}
if (!this->m_pools.insert(std::make_pair(g_accountLinkedUserDataSavePoolName, new (std::nothrow) NRecycleObjectPool<CAccountLinkedUserDataSaveAsyncWork>(2))).second) {
return false;
}
if (!this->m_pools.insert(std::make_pair(g_characterLinkedUserDataLoadPoolName, new (std::nothrow) NRecycleObjectPool<CCharacterLinkedUserDataLoadAsyncWork>(2))).second) {
return false;
}
if (!this->m_pools.insert(std::make_pair(g_characterLinkedUserDataSavePoolName, new (std::nothrow) NRecycleObjectPool<CCharacterLinkedUserDataSaveAsyncWork>(2))).second) {
return false;
}
if (!this->m_pools.insert(std::make_pair(g_emblemDataUploadPoolName, new (std::nothrow) NRecycleObjectPool<CEmblemDataUploadAsyncWork>(2))).second) {
return false;
}
if (!this->m_pools.insert(std::make_pair(g_emblemDataDownloadPoolName, new (std::nothrow) NRecycleObjectPool<CEmblemDataDownloadAsyncWork>(2))).second) {
return false;
}
if (!this->m_pools.insert(std::make_pair(g_mcStoreInfoBackupLoadPoolName, new (std::nothrow) NRecycleObjectPool<CMCStoreInfoBackupLoadAsyncWork>(2))).second) {
return false;
}
if (!this->m_pools.insert(std::make_pair(g_mcStoreInfoBackupSavePoolName, new (std::nothrow) NRecycleObjectPool<CMCStoreInfoBackupSaveAsyncWork>(2))).second) {
return false;
}
if (!this->m_pools.insert(std::make_pair(g_loadPartyListPoolName, new (std::nothrow) NRecycleObjectPool<CLoadPartyListAsyncWork>(2))).second) {
return false;
}
if (!this->m_pools.insert(std::make_pair(g_loadMyPartyPoolName, new (std::nothrow) NRecycleObjectPool<CLoadMyPartyAsyncWork>(2))).second) {
return false;
}
if (!this->m_pools.insert(std::make_pair(g_registerPartyPoolName, new (std::nothrow) NRecycleObjectPool<CRegisterPartyAsyncWork>(2))).second) {
return false;
}
if (!this->m_pools.insert(std::make_pair(g_stopRecruitingPoolName, new (std::nothrow) NRecycleObjectPool<CStopRecruitingAsyncWork>(2))).second) {
return false;
}
if (!this->m_pools.insert(std::make_pair(g_changePartyMasterPoolName, new (std::nothrow) NRecycleObjectPool<CChangePartyMasterAsyncWork>(2))).second) {
return false;
}
if (!this->m_pools.insert(std::make_pair(g_loadPartyInfoPoolName, new (std::nothrow) NRecycleObjectPool<CLoadPartyInfoAsyncWork>(2))).second) {
return false;
}
return true;
}