From a8b31c8bdb1142b1fa8b24937e9e69de9514b1cd Mon Sep 17 00:00:00 2001 From: Adam Johnson Date: Fri, 22 Apr 2011 23:07:35 -0400 Subject: [PATCH] Some code style fixes --- .../PubUtilLib/plVault/plVaultClientApi.cpp | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/Sources/Plasma/PubUtilLib/plVault/plVaultClientApi.cpp b/Sources/Plasma/PubUtilLib/plVault/plVaultClientApi.cpp index b4e93fae..b00f0c51 100644 --- a/Sources/Plasma/PubUtilLib/plVault/plVaultClientApi.cpp +++ b/Sources/Plasma/PubUtilLib/plVault/plVaultClientApi.cpp @@ -2793,28 +2793,28 @@ namespace _VaultRegisterOwnedAge { UInt32* fAgeInfoId; ~_Params() { - delete fSpawn; - delete fAgeInfoId; + DEL(fSpawn); + DEL(fAgeInfoId); } }; void _AddAgeInfoNode(ENetError result, void* param) { - if (result != kNetSuccess) + if (IS_NET_ERROR(result)) LogMsg(kLogError, "VaultRegisterOwnedAge: Failed to add info to link (async)"); } void _AddAgeLinkNode(ENetError result, void* param) { - if (result != kNetSuccess) + if (IS_NET_ERROR(result)) LogMsg(kLogError, "VaultRegisterOwnedAge: Failed to add age to bookshelf (async)"); } void _AddPlayerInfoNode(ENetError result, void* param) { - if (result != kNetSuccess) + if (IS_NET_ERROR(result)) LogMsg(kLogError, "VaultRegisterOwnedAge: Failed to add playerInfo to ageOwners (async)"); } void _CreateAgeLinkNode(ENetError result, void* state, void* param, RelVaultNode* node) { - if (result != kNetSuccess) { + if (IS_NET_ERROR(result)) { LogMsg(kLogError, "VaultRegisterOwnedAge: Failed to create AgeLink (async)"); return; } @@ -2852,18 +2852,18 @@ namespace _VaultRegisterOwnedAge { // Don't leak memory agesIOwn->DecRef(); plyrInfo->DecRef(); - delete p; + DEL(p); } void _DownloadCallback(ENetError result, void* param) { - if (result == kNetSuccess) { - VaultCreateNode(plVault::kNodeType_AgeLink, (FVaultCreateNodeCallback)_CreateAgeLinkNode, nil, param); - } else + if (IS_NET_ERROR(result)) LogMsg(kLogError, "VaultRegisterOwnedAge: Failed to download age vault (async)"); + else + VaultCreateNode(plVault::kNodeType_AgeLink, (FVaultCreateNodeCallback)_CreateAgeLinkNode, nil, param); } void _InitAgeCallback(ENetError result, void* state, void* param, UInt32 ageVaultId, UInt32 ageInfoVaultId) { - if (result == kNetSuccess) { + if (IS_NET_SUCCESS(result)) { _Params* p = TRACKED_NEW _Params(); p->fAgeInfoId = TRACKED_NEW UInt32(ageInfoVaultId); p->fSpawn = (plSpawnPointInfo*)param;