From 951011d90394f2da8f70f22257a43bb278b3ad84 Mon Sep 17 00:00:00 2001 From: Zrax Date: Wed, 6 Apr 2011 19:44:10 -0700 Subject: [PATCH 1/8] Fix a few issues with more strict modern compilers (cherry picked from commit ecb7d8b5665c02080ae641cb681665ecf15f26c5) --- Sources/Plasma/FeatureLib/pfPython/cyAccountManagement.cpp | 2 +- Sources/Plasma/PubUtilLib/plNetClient/plNetClientGroup.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Sources/Plasma/FeatureLib/pfPython/cyAccountManagement.cpp b/Sources/Plasma/FeatureLib/pfPython/cyAccountManagement.cpp index f615ad84..039b34b3 100644 --- a/Sources/Plasma/FeatureLib/pfPython/cyAccountManagement.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/cyAccountManagement.cpp @@ -67,7 +67,7 @@ PyObject* cyAccountManagement::GetPlayerList() for (int i = 0; i < numPlayers; ++i) { PyObject* playerTuple = PyTuple_New(3); - PyObject* playerName = PyUnicode_FromUnicode(playerList[i].playerName, wcslen(playerList[i].playerName)); + PyObject* playerName = PyUnicode_FromUnicode((const Py_UNICODE*)playerList[i].playerName, wcslen(playerList[i].playerName)); PyObject* playerId = PyInt_FromLong(playerList[i].playerInt); PyObject* avatarShape = PyString_FromString(playerList[i].avatarDatasetName); diff --git a/Sources/Plasma/PubUtilLib/plNetClient/plNetClientGroup.h b/Sources/Plasma/PubUtilLib/plNetClient/plNetClientGroup.h index 741f1f8b..b2459ddf 100644 --- a/Sources/Plasma/PubUtilLib/plNetClient/plNetClientGroup.h +++ b/Sources/Plasma/PubUtilLib/plNetClient/plNetClientGroup.h @@ -100,8 +100,9 @@ public: std::set::iterator it=IFind(grpId); if (it != fGroups.end()) { + OwnedGroup grp(it->fGroup, it->fOwnIt); fGroups.erase(it); - fGroups.insert(OwnedGroup(grpId, ownIt)); + fGroups.insert(grp); } else { From 8b7a955d9bbcc54e36a2f4fe6f06628ca6f324c2 Mon Sep 17 00:00:00 2001 From: Zrax Date: Wed, 6 Apr 2011 20:39:14 -0600 Subject: [PATCH 2/8] Remove useless ref macro, since it conflicts with VS2010's libraries. The compiler warnings will have to be cleaned up later (without the use of a silly macro) (cherry picked from commit 4218993bf5d544af825a8dff07217fd2d6b605df) --- .../Plasma/Apps/plClientPatcher/UruPlayer.cpp | 11 +---- .../Plasma/Apps/plUruLauncher/SelfPatcher.cpp | 5 +- Sources/Plasma/CoreLib/hsTypes.h | 14 ------ Sources/Plasma/CoreLibExe/hsExeError.cpp | 12 ----- Sources/Plasma/CoreLibExe/hsExeMalloc.cpp | 24 ---------- .../pfGameMgr/BlueSpiral/pfGmBlueSpiral.cpp | 10 ---- .../ClimbingWall/pfGmClimbingWall.cpp | 8 +--- .../FeatureLib/pfGameMgr/Heek/pfGmHeek.cpp | 11 ----- .../pfGameMgr/Marker/pfGmMarker.cpp | 24 ---------- .../pfGameMgr/TicTacToe/pfGmTicTacToe.cpp | 6 --- .../pfGameMgr/VarSync/pfGmVarSync.cpp | 10 ---- .../Plasma/FeatureLib/pfGameMgr/pfGameMgr.cpp | 12 ----- .../FeatureLib/pfPython/pyAgeInfoStruct.cpp | 13 +---- .../pnAsyncCoreExe/Private/Nt/pnAceNt.cpp | 3 -- .../Private/Nt/pnAceNtSocket.cpp | 7 --- .../Private/W9x/pnAceW9xSocket.cpp | 13 ----- .../Private/W9x/pnAceW9xThread.cpp | 2 - .../Private/Win32/pnAceW32Thread.cpp | 3 -- .../NucleusLib/pnAsyncCoreExe/pnAceCore.cpp | 5 -- .../NucleusLib/pnAsyncCoreExe/pnAceLog.cpp | 15 ------ .../NucleusLib/pnIni/Private/pnIniCore.cpp | 3 -- .../pnIniExe/Private/Win32/pnW32IniChange.cpp | 2 - .../Plasma/NucleusLib/pnNetCli/pnNcCli.cpp | 4 -- .../Plasma/NucleusLib/pnNetDiag/pnNdDns.cpp | 2 - .../Plasma/NucleusLib/pnNetDiag/pnNdTcp.cpp | 4 -- .../pnNetProtocol/Private/pnNpCommon.cpp | 2 - .../NucleusLib/pnSimpleNet/pnSimpleNet.cpp | 2 - .../pnUtils/Private/Win32/pnUtW32Addr.cpp | 1 - .../NucleusLib/pnUtils/Private/pnUtArray.cpp | 1 - .../NucleusLib/pnUtils/Private/pnUtArray.h | 10 ++-- .../NucleusLib/pnUtils/Private/pnUtBase64.cpp | 3 -- .../NucleusLib/pnUtils/Private/pnUtCmd.cpp | 5 -- .../NucleusLib/pnUtils/Private/pnUtCrypt.cpp | 8 ++-- .../NucleusLib/pnUtils/Private/pnUtEndian.h | 9 ---- .../NucleusLib/pnUtils/Private/pnUtHash.h | 3 -- .../NucleusLib/pnUtils/Private/pnUtList.h | 4 -- .../NucleusLib/pnUtils/Private/pnUtRef.h | 5 -- .../pnUtils/Private/pnUtSpareList.cpp | 4 -- .../NucleusLib/pnUtils/Private/pnUtUuid.h | 4 +- .../PubUtilLib/plNetCommon/plNetCommon.h | 4 +- .../plNetGameLib/Private/plNglAuth.cpp | 47 ------------------- .../plNetGameLib/Private/plNglFile.cpp | 6 --- .../plNetGameLib/Private/plNglGame.cpp | 14 ------ .../plNetGameLib/Private/plNglGateKeeper.cpp | 8 ---- 44 files changed, 15 insertions(+), 348 deletions(-) diff --git a/Sources/Plasma/Apps/plClientPatcher/UruPlayer.cpp b/Sources/Plasma/Apps/plClientPatcher/UruPlayer.cpp index 596c4d41..f524275d 100644 --- a/Sources/Plasma/Apps/plClientPatcher/UruPlayer.cpp +++ b/Sources/Plasma/Apps/plClientPatcher/UruPlayer.cpp @@ -386,10 +386,6 @@ static void DownloadCallback ( ) { s_numConnectFailures = 0; - REF(result); - REF(param); - REF(filename); - ManifestFile *mf = (ManifestFile *)param; if (IS_NET_ERROR(result) && s_running && !s_patchError) { if (result == kNetErrFileNotFound) { @@ -732,8 +728,6 @@ static void ThinManifestCallback ( ){ s_numConnectFailures = 0; - REF(group); - plLauncherInfo * info = (plLauncherInfo *) param; char text[256]; StrPrintf(text, arrsize(text), "Checking for updates..."); @@ -831,8 +825,6 @@ static void FileSrvIpAddressCallback ( void * param, const wchar addr[] ) { - REF(param); - NetCliGateKeeperDisconnect(); if (IS_NET_ERROR(result)) { @@ -960,7 +952,6 @@ void UruPrepProc (void * param) { void PlayerStopProc (void * param) { s_running = false; plLauncherInfo *info = (plLauncherInfo *) param; - //TerminateProcess(s_pi.hProcess, kExitCodeTerminated); info->stopCallback(kStatusOk, nil); } @@ -1036,4 +1027,4 @@ void UruStartProc (void * param) { { info->startCallback(kStatusError, nil); } -} \ No newline at end of file +} diff --git a/Sources/Plasma/Apps/plUruLauncher/SelfPatcher.cpp b/Sources/Plasma/Apps/plUruLauncher/SelfPatcher.cpp index fad8482d..3663b396 100644 --- a/Sources/Plasma/Apps/plUruLauncher/SelfPatcher.cpp +++ b/Sources/Plasma/Apps/plUruLauncher/SelfPatcher.cpp @@ -821,10 +821,7 @@ void plSelfPatcher::Stop() } //============================================================================ -void plSelfPatcher::NetErrorHandler(ENetProtocol protocol, ENetError error) -{ - REF(protocol); - +void plSelfPatcher::NetErrorHandler (ENetProtocol protocol, ENetError error) { LogMsg(kLogError, L"plSelfPatcher::NetErrorHandler: %s", NetErrorToString(error)); if (IS_NET_SUCCESS(s_selfPatcher.fResult)) s_selfPatcher.fResult = error; diff --git a/Sources/Plasma/CoreLib/hsTypes.h b/Sources/Plasma/CoreLib/hsTypes.h index 254eac17..77f67653 100644 --- a/Sources/Plasma/CoreLib/hsTypes.h +++ b/Sources/Plasma/CoreLib/hsTypes.h @@ -308,20 +308,6 @@ typedef hsColor32 hsRGBAColor32; #endif -/**************************************************************************** -* -* REF -* References a variable to prevent compiler warnings -* -***/ - -#define REF(a) ((void *)&(a)) - -#if _MSC_VER < 1400 -// For compatibility only, deprecated - use REF instead -#define ref(a) REF(a) -#endif - /**************************************************************************** * * UNIQUE_SYMBOL diff --git a/Sources/Plasma/CoreLibExe/hsExeError.cpp b/Sources/Plasma/CoreLibExe/hsExeError.cpp index 5aa390c5..a086f415 100644 --- a/Sources/Plasma/CoreLibExe/hsExeError.cpp +++ b/Sources/Plasma/CoreLibExe/hsExeError.cpp @@ -79,9 +79,6 @@ AUTO_INIT_FUNC(hsExeErrorInit) { //============================================================================ static void DoAssert (int line, const char file[], const char msg[]) { - REF(line); - REF(file); - ErrorMinimizeAppWindow(); #ifdef HS_BUILD_FOR_WIN32 @@ -249,11 +246,6 @@ void DebugMsgV (const char fmt[], va_list args) { if (s_critsect) s_critsect->Leave(); -#else - - REF(fmt); - REF(args); - #endif } @@ -266,9 +258,5 @@ void __cdecl DebugMsg (const char fmt[], ...) { DebugMsgV(fmt, args); va_end(args); -#else - - REF(fmt); - #endif } diff --git a/Sources/Plasma/CoreLibExe/hsExeMalloc.cpp b/Sources/Plasma/CoreLibExe/hsExeMalloc.cpp index b602b589..cdaa0981 100644 --- a/Sources/Plasma/CoreLibExe/hsExeMalloc.cpp +++ b/Sources/Plasma/CoreLibExe/hsExeMalloc.cpp @@ -295,8 +295,6 @@ static void __cdecl ReportMem (EMemFile file, bool showDialog, const char fmt[], //============================================================================ #ifdef MEM_DEBUG static void __cdecl MemDumpCallback (void * mem, void * param) { - REF(MemDumpCallback); - const _CrtMemBlockHeader * pHead = pHdr(mem); MemDumpParam * dumpParam = (MemDumpParam *) param; @@ -337,7 +335,6 @@ static void __cdecl OnExitMemDumpCallback (void * mem, size_t) { //=========================================================================== #ifdef MEM_DEBUG static void __cdecl CheckLeaksOnExit () { - REF(CheckLeaksOnExit); if (!ErrorGetOption(kErrOptDisableMemLeakChecking)) { MemDumpParam param; param.file = kMemLeaks; @@ -357,17 +354,8 @@ static int __cdecl CrtAllocHook ( const unsigned char * szFileName, int nLine ) { - REF(method); - REF(pUserData); - REF(nSize); - REF(nBlockUse); - REF(lRequest); - REF(szFileName); - REF(nLine); - if (nBlockUse == _NORMAL_BLOCK) { int xx = 0; - REF(xx); } return 1; @@ -434,8 +422,6 @@ void MemValidateNow () { //============================================================================ void MemSetValidation (unsigned on) { - REF(on); - #ifdef MEM_DEBUG #endif // MEM_DEBUG } @@ -459,8 +445,6 @@ void MemPopDisableTracking () { //============================================================================ void MemSetColor (unsigned short color) { - REF(color); - #ifdef MEM_DEBUG s_memColor = color & 0xFFFF; #endif // MEM_DEBUG @@ -469,9 +453,6 @@ void MemSetColor (unsigned short color) { //=========================================================================== void * MemAlloc (unsigned bytes, unsigned flags, const char file[], int line) { - REF(file); - REF(line); - #ifdef MEM_DEBUG unsigned block; if (flags & kMemIgnoreBlock || s_memCheckOff) @@ -520,8 +501,6 @@ void * MemAlloc (unsigned bytes, unsigned flags, const char file[], int line) { //============================================================================ void MemFree (void * ptr, unsigned flags) { - REF(flags); - if (!ptr) return; @@ -535,9 +514,6 @@ void MemFree (void * ptr, unsigned flags) { //=========================================================================== void * MemRealloc (void * ptr, unsigned bytes, unsigned flags, const char file[], int line) { - REF(file); - REF(line); - #ifdef HS_DEBUGGING unsigned oldBytes = ptr ? MemSize(ptr) : 0; #endif diff --git a/Sources/Plasma/FeatureLib/pfGameMgr/BlueSpiral/pfGmBlueSpiral.cpp b/Sources/Plasma/FeatureLib/pfGameMgr/BlueSpiral/pfGmBlueSpiral.cpp index 96ff408c..b37256d1 100644 --- a/Sources/Plasma/FeatureLib/pfGameMgr/BlueSpiral/pfGmBlueSpiral.cpp +++ b/Sources/Plasma/FeatureLib/pfGameMgr/BlueSpiral/pfGmBlueSpiral.cpp @@ -150,8 +150,6 @@ void IBlueSpiral::OnOwnerChange (const Srv2Cli_Game_OwnerChange & msg) { //============================================================================ void IBlueSpiral::RecvClothOrder (const Srv2Cli_BlueSpiral_ClothOrder & msg, void * param) { - REF(param); - pfGameCliMsg * gameCliMsg = NEWZERO(pfGameCliMsg); gameCliMsg->Set(gameCli, msg); gameCliMsg->Send(gameCli->GetReceiver()); @@ -159,8 +157,6 @@ void IBlueSpiral::RecvClothOrder (const Srv2Cli_BlueSpiral_ClothOrder & msg, voi //============================================================================ void IBlueSpiral::RecvSuccessfulHit (const Srv2Cli_BlueSpiral_SuccessfulHit & msg, void * param) { - REF(param); - pfGameCliMsg * gameCliMsg = NEWZERO(pfGameCliMsg); gameCliMsg->Set(gameCli, msg); gameCliMsg->Send(gameCli->GetReceiver()); @@ -168,8 +164,6 @@ void IBlueSpiral::RecvSuccessfulHit (const Srv2Cli_BlueSpiral_SuccessfulHit & ms //============================================================================ void IBlueSpiral::RecvGameWon (const Srv2Cli_BlueSpiral_GameWon & msg, void * param) { - REF(param); - pfGameCliMsg * gameCliMsg = NEWZERO(pfGameCliMsg); gameCliMsg->Set(gameCli, msg); gameCliMsg->Send(gameCli->GetReceiver()); @@ -177,8 +171,6 @@ void IBlueSpiral::RecvGameWon (const Srv2Cli_BlueSpiral_GameWon & msg, void * pa //============================================================================ void IBlueSpiral::RecvGameOver (const Srv2Cli_BlueSpiral_GameOver & msg, void * param) { - REF(param); - pfGameCliMsg * gameCliMsg = NEWZERO(pfGameCliMsg); gameCliMsg->Set(gameCli, msg); gameCliMsg->Send(gameCli->GetReceiver()); @@ -186,8 +178,6 @@ void IBlueSpiral::RecvGameOver (const Srv2Cli_BlueSpiral_GameOver & msg, void * //============================================================================ void IBlueSpiral::RecvGameStarted (const Srv2Cli_BlueSpiral_GameStarted & msg, void * param) { - REF(param); - pfGameCliMsg * gameCliMsg = NEWZERO(pfGameCliMsg); gameCliMsg->Set(gameCli, msg); gameCliMsg->Send(gameCli->GetReceiver()); diff --git a/Sources/Plasma/FeatureLib/pfGameMgr/ClimbingWall/pfGmClimbingWall.cpp b/Sources/Plasma/FeatureLib/pfGameMgr/ClimbingWall/pfGmClimbingWall.cpp index 98a5199b..c3c83489 100644 --- a/Sources/Plasma/FeatureLib/pfGameMgr/ClimbingWall/pfGmClimbingWall.cpp +++ b/Sources/Plasma/FeatureLib/pfGameMgr/ClimbingWall/pfGmClimbingWall.cpp @@ -151,7 +151,6 @@ void IClimbingWall::OnOwnerChange (const Srv2Cli_Game_OwnerChange & msg) { //============================================================================ void IClimbingWall::RecvNumBlockersChanged (const Srv2Cli_ClimbingWall_NumBlockersChanged & msg, void * param) { - REF(param); pfGameCliMsg * gameCliMsg = NEWZERO(pfGameCliMsg); gameCliMsg->Set(gameCli, msg); @@ -160,7 +159,6 @@ void IClimbingWall::RecvNumBlockersChanged (const Srv2Cli_ClimbingWall_NumBlocke //============================================================================ void IClimbingWall::RecvReady (const Srv2Cli_ClimbingWall_Ready & msg, void * param) { - REF(param); pfGameCliMsg * gameCliMsg = NEWZERO(pfGameCliMsg); gameCliMsg->Set(gameCli, msg); @@ -169,7 +167,6 @@ void IClimbingWall::RecvReady (const Srv2Cli_ClimbingWall_Ready & msg, void * pa //============================================================================ void IClimbingWall::RecvBlockersChanged (const Srv2Cli_ClimbingWall_BlockersChanged & msg, void * param) { - REF(param); pfGameCliMsg * gameCliMsg = NEWZERO(pfGameCliMsg); gameCliMsg->Set(gameCli, msg); @@ -178,7 +175,6 @@ void IClimbingWall::RecvBlockersChanged (const Srv2Cli_ClimbingWall_BlockersChan //============================================================================ void IClimbingWall::RecvPlayerEntered (const Srv2Cli_ClimbingWall_PlayerEntered & msg, void * param) { - REF(param); pfGameCliMsg * gameCliMsg = NEWZERO(pfGameCliMsg); gameCliMsg->Set(gameCli, msg); @@ -187,7 +183,6 @@ void IClimbingWall::RecvPlayerEntered (const Srv2Cli_ClimbingWall_PlayerEntered //============================================================================ void IClimbingWall::RecvSuitMachineLocked (const Srv2Cli_ClimbingWall_SuitMachineLocked & msg, void * param) { - REF(param); pfGameCliMsg * gameCliMsg = NEWZERO(pfGameCliMsg); gameCliMsg->Set(gameCli, msg); @@ -196,7 +191,6 @@ void IClimbingWall::RecvSuitMachineLocked (const Srv2Cli_ClimbingWall_SuitMachin //============================================================================ void IClimbingWall::RecvGameOver (const Srv2Cli_ClimbingWall_GameOver & msg, void * param) { - REF(param); pfGameCliMsg * gameCliMsg = NEWZERO(pfGameCliMsg); gameCliMsg->Set(gameCli, msg); @@ -359,4 +353,4 @@ void pfGmClimbingWall::Panic () { msg.transId = 0; GameMgrSend(&msg); -} \ No newline at end of file +} diff --git a/Sources/Plasma/FeatureLib/pfGameMgr/Heek/pfGmHeek.cpp b/Sources/Plasma/FeatureLib/pfGameMgr/Heek/pfGmHeek.cpp index 316ab495..22d1660b 100644 --- a/Sources/Plasma/FeatureLib/pfGameMgr/Heek/pfGmHeek.cpp +++ b/Sources/Plasma/FeatureLib/pfGameMgr/Heek/pfGmHeek.cpp @@ -151,7 +151,6 @@ void IHeek::OnOwnerChange (const Srv2Cli_Game_OwnerChange & msg) { //============================================================================ void IHeek::RecvPlayGame (const Srv2Cli_Heek_PlayGame & msg, void * param) { - REF(param); pfGameCliMsg * gameCliMsg = NEWZERO(pfGameCliMsg); gameCliMsg->Set(gameCli, msg); gameCliMsg->Send(gameCli->GetReceiver()); @@ -159,7 +158,6 @@ void IHeek::RecvPlayGame (const Srv2Cli_Heek_PlayGame & msg, void * param) { //============================================================================ void IHeek::RecvGoodbye (const Srv2Cli_Heek_Goodbye & msg, void * param) { - REF(param); pfGameCliMsg * gameCliMsg = NEWZERO(pfGameCliMsg); gameCliMsg->Set(gameCli, msg); gameCliMsg->Send(gameCli->GetReceiver()); @@ -167,7 +165,6 @@ void IHeek::RecvGoodbye (const Srv2Cli_Heek_Goodbye & msg, void * param) { //============================================================================ void IHeek::RecvWelcome (const Srv2Cli_Heek_Welcome & msg, void * param) { - REF(param); pfGameCliMsg * gameCliMsg = NEWZERO(pfGameCliMsg); gameCliMsg->Set(gameCli, msg); gameCliMsg->Send(gameCli->GetReceiver()); @@ -175,7 +172,6 @@ void IHeek::RecvWelcome (const Srv2Cli_Heek_Welcome & msg, void * param) { //============================================================================ void IHeek::RecvDrop (const Srv2Cli_Heek_Drop & msg, void * param) { - REF(param); pfGameCliMsg * gameCliMsg = NEWZERO(pfGameCliMsg); gameCliMsg->Set(gameCli, msg); gameCliMsg->Send(gameCli->GetReceiver()); @@ -183,7 +179,6 @@ void IHeek::RecvDrop (const Srv2Cli_Heek_Drop & msg, void * param) { //============================================================================ void IHeek::RecvSetup (const Srv2Cli_Heek_Setup & msg, void * param) { - REF(param); pfGameCliMsg * gameCliMsg = NEWZERO(pfGameCliMsg); gameCliMsg->Set(gameCli, msg); gameCliMsg->Send(gameCli->GetReceiver()); @@ -191,7 +186,6 @@ void IHeek::RecvSetup (const Srv2Cli_Heek_Setup & msg, void * param) { //============================================================================ void IHeek::RecvLightState (const Srv2Cli_Heek_LightState & msg, void * param) { - REF(param); pfGameCliMsg * gameCliMsg = NEWZERO(pfGameCliMsg); gameCliMsg->Set(gameCli, msg); gameCliMsg->Send(gameCli->GetReceiver()); @@ -199,7 +193,6 @@ void IHeek::RecvLightState (const Srv2Cli_Heek_LightState & msg, void * param) { //============================================================================ void IHeek::RecvInterfaceState (const Srv2Cli_Heek_InterfaceState & msg, void * param) { - REF(param); pfGameCliMsg * gameCliMsg = NEWZERO(pfGameCliMsg); gameCliMsg->Set(gameCli, msg); gameCliMsg->Send(gameCli->GetReceiver()); @@ -207,7 +200,6 @@ void IHeek::RecvInterfaceState (const Srv2Cli_Heek_InterfaceState & msg, void * //============================================================================ void IHeek::RecvCountdownState (const Srv2Cli_Heek_CountdownState & msg, void * param) { - REF(param); pfGameCliMsg * gameCliMsg = NEWZERO(pfGameCliMsg); gameCliMsg->Set(gameCli, msg); gameCliMsg->Send(gameCli->GetReceiver()); @@ -215,7 +207,6 @@ void IHeek::RecvCountdownState (const Srv2Cli_Heek_CountdownState & msg, void * //============================================================================ void IHeek::RecvWinLose (const Srv2Cli_Heek_WinLose & msg, void * param) { - REF(param); pfGameCliMsg * gameCliMsg = NEWZERO(pfGameCliMsg); gameCliMsg->Set(gameCli, msg); gameCliMsg->Send(gameCli->GetReceiver()); @@ -223,7 +214,6 @@ void IHeek::RecvWinLose (const Srv2Cli_Heek_WinLose & msg, void * param) { //============================================================================ void IHeek::RecvGameWin (const Srv2Cli_Heek_GameWin & msg, void * param) { - REF(param); pfGameCliMsg * gameCliMsg = NEWZERO(pfGameCliMsg); gameCliMsg->Set(gameCli, msg); gameCliMsg->Send(gameCli->GetReceiver()); @@ -231,7 +221,6 @@ void IHeek::RecvGameWin (const Srv2Cli_Heek_GameWin & msg, void * param) { //============================================================================ void IHeek::RecvPointUpdate (const Srv2Cli_Heek_PointUpdate & msg, void * param) { - REF(param); pfGameCliMsg * gameCliMsg = NEWZERO(pfGameCliMsg); gameCliMsg->Set(gameCli, msg); gameCliMsg->Send(gameCli->GetReceiver()); diff --git a/Sources/Plasma/FeatureLib/pfGameMgr/Marker/pfGmMarker.cpp b/Sources/Plasma/FeatureLib/pfGameMgr/Marker/pfGmMarker.cpp index d62bc49d..9d7f454b 100644 --- a/Sources/Plasma/FeatureLib/pfGameMgr/Marker/pfGmMarker.cpp +++ b/Sources/Plasma/FeatureLib/pfGameMgr/Marker/pfGmMarker.cpp @@ -175,8 +175,6 @@ void IMarker::RecvTeamAssigned (const Srv2Cli_Marker_TeamAssigned & msg, void * //============================================================================ void IMarker::RecvGameType (const Srv2Cli_Marker_GameType & msg, void * param) { - REF(param); - pfGameCliMsg * gameCliMsg = NEWZERO(pfGameCliMsg); gameCliMsg->Set(gameCli, msg); gameCliMsg->Send(gameCli->GetReceiver()); @@ -184,8 +182,6 @@ void IMarker::RecvGameType (const Srv2Cli_Marker_GameType & msg, void * param) { //============================================================================ void IMarker::RecvGameStarted (const Srv2Cli_Marker_GameStarted & msg, void * param) { - REF(param); - pfGameCliMsg * gameCliMsg = NEWZERO(pfGameCliMsg); gameCliMsg->Set(gameCli, msg); gameCliMsg->Send(gameCli->GetReceiver()); @@ -193,8 +189,6 @@ void IMarker::RecvGameStarted (const Srv2Cli_Marker_GameStarted & msg, void * pa //============================================================================ void IMarker::RecvGamePaused (const Srv2Cli_Marker_GamePaused & msg, void * param) { - REF(param); - pfGameCliMsg * gameCliMsg = NEWZERO(pfGameCliMsg); gameCliMsg->Set(gameCli, msg); gameCliMsg->Send(gameCli->GetReceiver()); @@ -202,8 +196,6 @@ void IMarker::RecvGamePaused (const Srv2Cli_Marker_GamePaused & msg, void * para //============================================================================ void IMarker::RecvGameReset (const Srv2Cli_Marker_GameReset & msg, void * param) { - REF(param); - pfGameCliMsg * gameCliMsg = NEWZERO(pfGameCliMsg); gameCliMsg->Set(gameCli, msg); gameCliMsg->Send(gameCli->GetReceiver()); @@ -211,8 +203,6 @@ void IMarker::RecvGameReset (const Srv2Cli_Marker_GameReset & msg, void * param) //============================================================================ void IMarker::RecvGameOver (const Srv2Cli_Marker_GameOver & msg, void * param) { - REF(param); - pfGameCliMsg * gameCliMsg = NEWZERO(pfGameCliMsg); gameCliMsg->Set(gameCli, msg); gameCliMsg->Send(gameCli->GetReceiver()); @@ -220,8 +210,6 @@ void IMarker::RecvGameOver (const Srv2Cli_Marker_GameOver & msg, void * param) { //============================================================================ void IMarker::RecvGameNameChanged (const Srv2Cli_Marker_GameNameChanged & msg, void * param) { - REF(param); - pfGameCliMsg * gameCliMsg = NEWZERO(pfGameCliMsg); gameCliMsg->Set(gameCli, msg); gameCliMsg->Send(gameCli->GetReceiver()); @@ -229,8 +217,6 @@ void IMarker::RecvGameNameChanged (const Srv2Cli_Marker_GameNameChanged & msg, v //============================================================================ void IMarker::RecvTimeLimitChanged (const Srv2Cli_Marker_TimeLimitChanged & msg, void * param) { - REF(param); - pfGameCliMsg * gameCliMsg = NEWZERO(pfGameCliMsg); gameCliMsg->Set(gameCli, msg); gameCliMsg->Send(gameCli->GetReceiver()); @@ -238,8 +224,6 @@ void IMarker::RecvTimeLimitChanged (const Srv2Cli_Marker_TimeLimitChanged & msg, //============================================================================ void IMarker::RecvGameDeleted (const Srv2Cli_Marker_GameDeleted & msg, void * param) { - REF(param); - pfGameCliMsg * gameCliMsg = NEWZERO(pfGameCliMsg); gameCliMsg->Set(gameCli, msg); gameCliMsg->Send(gameCli->GetReceiver()); @@ -250,8 +234,6 @@ void IMarker::RecvGameDeleted (const Srv2Cli_Marker_GameDeleted & msg, void * pa //============================================================================ void IMarker::RecvMarkerAdded (const Srv2Cli_Marker_MarkerAdded & msg, void * param) { - REF(param); - pfGameCliMsg * gameCliMsg = NEWZERO(pfGameCliMsg); gameCliMsg->Set(gameCli, msg); gameCliMsg->Send(gameCli->GetReceiver()); @@ -259,8 +241,6 @@ void IMarker::RecvMarkerAdded (const Srv2Cli_Marker_MarkerAdded & msg, void * pa //============================================================================ void IMarker::RecvMarkerDeleted (const Srv2Cli_Marker_MarkerDeleted & msg, void * param) { - REF(param); - pfGameCliMsg * gameCliMsg = NEWZERO(pfGameCliMsg); gameCliMsg->Set(gameCli, msg); gameCliMsg->Send(gameCli->GetReceiver()); @@ -268,8 +248,6 @@ void IMarker::RecvMarkerDeleted (const Srv2Cli_Marker_MarkerDeleted & msg, void //============================================================================ void IMarker::RecvMarkerNameChanged (const Srv2Cli_Marker_MarkerNameChanged & msg, void * param) { - REF(param); - pfGameCliMsg * gameCliMsg = NEWZERO(pfGameCliMsg); gameCliMsg->Set(gameCli, msg); gameCliMsg->Send(gameCli->GetReceiver()); @@ -277,8 +255,6 @@ void IMarker::RecvMarkerNameChanged (const Srv2Cli_Marker_MarkerNameChanged & ms //============================================================================ void IMarker::RecvMarkerCaptured (const Srv2Cli_Marker_MarkerCaptured & msg, void * param) { - REF(param); - pfGameCliMsg * gameCliMsg = NEWZERO(pfGameCliMsg); gameCliMsg->Set(gameCli, msg); gameCliMsg->Send(gameCli->GetReceiver()); diff --git a/Sources/Plasma/FeatureLib/pfGameMgr/TicTacToe/pfGmTicTacToe.cpp b/Sources/Plasma/FeatureLib/pfGameMgr/TicTacToe/pfGmTicTacToe.cpp index 4f7e85c5..134cc4e4 100644 --- a/Sources/Plasma/FeatureLib/pfGameMgr/TicTacToe/pfGmTicTacToe.cpp +++ b/Sources/Plasma/FeatureLib/pfGameMgr/TicTacToe/pfGmTicTacToe.cpp @@ -153,8 +153,6 @@ void ITicTacToe::OnOwnerChange (const Srv2Cli_Game_OwnerChange & msg) { //============================================================================ void ITicTacToe::RecvGameStarted (const Srv2Cli_TTT_GameStarted & msg, void * param) { - REF(param); - // player that goes first is shown as X's. if (msg.yourTurn) { myself = 'X'; @@ -172,8 +170,6 @@ void ITicTacToe::RecvGameStarted (const Srv2Cli_TTT_GameStarted & msg, void * pa //============================================================================ void ITicTacToe::RecvGameOver (const Srv2Cli_TTT_GameOver & msg, void * param) { - REF(param); - pfGameCliMsg * gameCliMsg = NEWZERO(pfGameCliMsg); gameCliMsg->Set(gameCli, msg); gameCliMsg->Send(gameCli->GetReceiver()); @@ -183,8 +179,6 @@ void ITicTacToe::RecvGameOver (const Srv2Cli_TTT_GameOver & msg, void * param) { //============================================================================ void ITicTacToe::RecvMoveMade (const Srv2Cli_TTT_MoveMade & msg, void * param) { - REF(param); - // Update the board with the appropriate piece if (msg.playerId == NetCommGetPlayer()->playerInt) board[msg.row][msg.col] = myself; diff --git a/Sources/Plasma/FeatureLib/pfGameMgr/VarSync/pfGmVarSync.cpp b/Sources/Plasma/FeatureLib/pfGameMgr/VarSync/pfGmVarSync.cpp index 121a5be3..a47f4797 100644 --- a/Sources/Plasma/FeatureLib/pfGameMgr/VarSync/pfGmVarSync.cpp +++ b/Sources/Plasma/FeatureLib/pfGameMgr/VarSync/pfGmVarSync.cpp @@ -150,8 +150,6 @@ void IVarSync::OnOwnerChange (const Srv2Cli_Game_OwnerChange & msg) { //============================================================================ void IVarSync::RecvStringVarChanged (const Srv2Cli_VarSync_StringVarChanged & msg, void * param) { - REF(param); - pfGameCliMsg * gameCliMsg = NEWZERO(pfGameCliMsg); gameCliMsg->Set(gameCli, msg); gameCliMsg->Send(gameCli->GetReceiver()); @@ -159,8 +157,6 @@ void IVarSync::RecvStringVarChanged (const Srv2Cli_VarSync_StringVarChanged & ms //============================================================================ void IVarSync::RecvNumericVarChanged (const Srv2Cli_VarSync_NumericVarChanged & msg, void * param) { - REF(param); - pfGameCliMsg * gameCliMsg = NEWZERO(pfGameCliMsg); gameCliMsg->Set(gameCli, msg); gameCliMsg->Send(gameCli->GetReceiver()); @@ -168,8 +164,6 @@ void IVarSync::RecvNumericVarChanged (const Srv2Cli_VarSync_NumericVarChanged & //============================================================================ void IVarSync::RecvAllVarsSent (const Srv2Cli_VarSync_AllVarsSent & msg, void * param) { - REF(param); - pfGameCliMsg * gameCliMsg = NEWZERO(pfGameCliMsg); gameCliMsg->Set(gameCli, msg); gameCliMsg->Send(gameCli->GetReceiver()); @@ -177,8 +171,6 @@ void IVarSync::RecvAllVarsSent (const Srv2Cli_VarSync_AllVarsSent & msg, void * //============================================================================ void IVarSync::RecvStringVarCreated (const Srv2Cli_VarSync_StringVarCreated & msg, void * param) { - REF(param); - pfGameCliMsg * gameCliMsg = NEWZERO(pfGameCliMsg); gameCliMsg->Set(gameCli, msg); gameCliMsg->Send(gameCli->GetReceiver()); @@ -186,8 +178,6 @@ void IVarSync::RecvStringVarCreated (const Srv2Cli_VarSync_StringVarCreated & ms //============================================================================ void IVarSync::RecvNumericVarCreated (const Srv2Cli_VarSync_NumericVarCreated & msg, void * param) { - REF(param); - pfGameCliMsg * gameCliMsg = NEWZERO(pfGameCliMsg); gameCliMsg->Set(gameCli, msg); gameCliMsg->Send(gameCli->GetReceiver()); diff --git a/Sources/Plasma/FeatureLib/pfGameMgr/pfGameMgr.cpp b/Sources/Plasma/FeatureLib/pfGameMgr/pfGameMgr.cpp index f5e53783..3f9ad5e2 100644 --- a/Sources/Plasma/FeatureLib/pfGameMgr/pfGameMgr.cpp +++ b/Sources/Plasma/FeatureLib/pfGameMgr/pfGameMgr.cpp @@ -205,8 +205,6 @@ void IGameMgr::RecvGameInstance (const Srv2Cli_GameMgr_GameInstance & msg, void //============================================================================ void IGameMgr::RecvInviteReceived (const Srv2Cli_GameMgr_InviteReceived & msg, void * param) { - REF(param); - pfGameMgrMsg * gameMgrMsg = NEWZERO(pfGameMgrMsg); gameMgrMsg->Set(msg); for (unsigned i = 0; i < s_receivers.Count(); ++i) @@ -216,8 +214,6 @@ void IGameMgr::RecvInviteReceived (const Srv2Cli_GameMgr_InviteReceived & msg, v //============================================================================ void IGameMgr::RecvInviteRevoked (const Srv2Cli_GameMgr_InviteRevoked & msg, void * param) { - REF(param); - pfGameMgrMsg * gameMgrMsg = NEWZERO(pfGameMgrMsg); gameMgrMsg->Set(msg); for (unsigned i = 0; i < s_receivers.Count(); ++i) @@ -587,31 +583,23 @@ void IGameCli::Recv (GameMsgHeader * msg, void * param) { //============================================================================ void IGameCli::RecvPlayerJoined (const Srv2Cli_Game_PlayerJoined & msg, void * param) { - REF(param); - ++playerCount; gameCli->OnPlayerJoined(msg); } //============================================================================ void IGameCli::RecvPlayerLeft (const Srv2Cli_Game_PlayerLeft & msg, void * param) { - REF(param); - --playerCount; gameCli->OnPlayerLeft(msg); } //============================================================================ void IGameCli::RecvInviteFailed (const Srv2Cli_Game_InviteFailed & msg, void * param) { - REF(param); - gameCli->OnInviteFailed(msg); } //============================================================================ void IGameCli::RecvOwnerChange (const Srv2Cli_Game_OwnerChange & msg, void * param) { - REF(param); - gameCli->OnOwnerChange(msg); } diff --git a/Sources/Plasma/FeatureLib/pfPython/pyAgeInfoStruct.cpp b/Sources/Plasma/FeatureLib/pfPython/pyAgeInfoStruct.cpp index 7bd6ab51..be983419 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyAgeInfoStruct.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/pyAgeInfoStruct.cpp @@ -123,18 +123,7 @@ const char * pyAgeInfoStruct::GetAgeInstanceGuid() const void pyAgeInfoStruct::SetAgeInstanceGuid( const char * guid ) { - if ( guid[0] == '@' ) - { - // if it starts with an @ then do a meta kind of GUID - std::string curInst = fAgeInfo.GetAgeInstanceName(); - std::string y = curInst + guid; - - plUUID instanceGuid; - CryptDigest(kCryptMd5, instanceGuid.fData , y.length(), y.c_str()); - fAgeInfo.SetAgeInstanceGuid(&instanceGuid); - } - else - fAgeInfo.SetAgeInstanceGuid( &plUUID( guid ) ); + fAgeInfo.SetAgeInstanceGuid( &plUUID( guid ) ); } Int32 pyAgeInfoStruct::GetAgeSequenceNumber() const diff --git a/Sources/Plasma/NucleusLib/pnAsyncCoreExe/Private/Nt/pnAceNt.cpp b/Sources/Plasma/NucleusLib/pnAsyncCoreExe/Private/Nt/pnAceNt.cpp index 1d618b95..66f44e43 100644 --- a/Sources/Plasma/NucleusLib/pnAsyncCoreExe/Private/Nt/pnAceNt.cpp +++ b/Sources/Plasma/NucleusLib/pnAsyncCoreExe/Private/Nt/pnAceNt.cpp @@ -244,8 +244,6 @@ static void INtOpDispatch ( //=========================================================================== static unsigned THREADCALL NtWorkerThreadProc (AsyncThread * thread) { - REF(thread); - ThreadDenyBlock(); unsigned sleepMs = INFINITE; @@ -340,7 +338,6 @@ void INtConnCompleteOperation (NtObject * ntObj) { return; DWORD err = GetLastError(); - REF(err); switch (ntObj->ioType) { case kNtFile: INtFileDelete((NtFile *) ntObj); diff --git a/Sources/Plasma/NucleusLib/pnAsyncCoreExe/Private/Nt/pnAceNtSocket.cpp b/Sources/Plasma/NucleusLib/pnAsyncCoreExe/Private/Nt/pnAceNtSocket.cpp index 9e3ff73a..f6b84c44 100644 --- a/Sources/Plasma/NucleusLib/pnAsyncCoreExe/Private/Nt/pnAceNtSocket.cpp +++ b/Sources/Plasma/NucleusLib/pnAsyncCoreExe/Private/Nt/pnAceNtSocket.cpp @@ -806,11 +806,6 @@ static void __cdecl DumpInvalidData ( const char fmt[], ... ) { - REF(filename); - REF(bytes); - REF(data); - REF(fmt); - wchar path[MAX_PATH]; PathGetProgramDirectory(path, arrsize(path)); PathAddFilename(path, path, L"Log", arrsize(path)); @@ -947,7 +942,6 @@ void INtSockDelete ( sock->notifyProc = nil; notifyProc((AsyncSocket) sock, kNotifySocketDisconnect, nil, &sock->userState); DWORD err = GetLastError(); - REF(err); } else { // Since the no application notification procedure was @@ -1016,7 +1010,6 @@ void INtSocketOpCompleteSocketRead ( if (sock->connType == kConnTypeCliToAuth) { int x = 0; - REF(x); } if (!SocketDispatchRead(sock)) diff --git a/Sources/Plasma/NucleusLib/pnAsyncCoreExe/Private/W9x/pnAceW9xSocket.cpp b/Sources/Plasma/NucleusLib/pnAsyncCoreExe/Private/W9x/pnAceW9xSocket.cpp index 2c6e37a8..c7b2331d 100644 --- a/Sources/Plasma/NucleusLib/pnAsyncCoreExe/Private/W9x/pnAceW9xSocket.cpp +++ b/Sources/Plasma/NucleusLib/pnAsyncCoreExe/Private/W9x/pnAceW9xSocket.cpp @@ -1007,10 +1007,6 @@ void W9xSocketConnect ( unsigned connectMs, unsigned localPort ) { - // Not supported for W9X - REF(connectMs); - REF(localPort); - // If necessary, startup the window and message queue HWND window = StartupWindow(); @@ -1155,8 +1151,6 @@ unsigned W9xSocketStartListening ( const NetAddress & listenAddr, FAsyncNotifySocketProc notifyProc ) { - REF(listenAddr); - REF(notifyProc); return 0; } @@ -1166,8 +1160,6 @@ void W9xSocketStopListening ( const NetAddress & listenAddr, FAsyncNotifySocketProc notifyProc ) { - REF(listenAddr); - REF(notifyProc); } //=========================================================================== @@ -1190,9 +1182,6 @@ void W9xSocketSetNotifyProc ( AsyncSocket sock, FAsyncNotifySocketProc notifyProc ) { - REF(sock); - REF(notifyProc); - // This provider does not allow changing the notification procedure FATAL("SocketSetNotifyProc"); } @@ -1204,8 +1193,6 @@ void W9xSocketSetBacklogAlloc ( ) { // This provider does not limit the maximum backlog allocation - REF(sock); - REF(bufferSize); } diff --git a/Sources/Plasma/NucleusLib/pnAsyncCoreExe/Private/W9x/pnAceW9xThread.cpp b/Sources/Plasma/NucleusLib/pnAsyncCoreExe/Private/W9x/pnAceW9xThread.cpp index 931a0f4f..674f3553 100644 --- a/Sources/Plasma/NucleusLib/pnAsyncCoreExe/Private/W9x/pnAceW9xThread.cpp +++ b/Sources/Plasma/NucleusLib/pnAsyncCoreExe/Private/W9x/pnAceW9xThread.cpp @@ -392,8 +392,6 @@ bool W9xThreadWaitId ( AsyncId asyncId, unsigned timeoutMs ) { - REF(file); - // Find a pending I/O operation with the given id s_critSect.Enter(); CThreadDispRec * disp; diff --git a/Sources/Plasma/NucleusLib/pnAsyncCoreExe/Private/Win32/pnAceW32Thread.cpp b/Sources/Plasma/NucleusLib/pnAsyncCoreExe/Private/Win32/pnAceW32Thread.cpp index ebe64a2f..d941883c 100644 --- a/Sources/Plasma/NucleusLib/pnAsyncCoreExe/Private/Win32/pnAceW32Thread.cpp +++ b/Sources/Plasma/NucleusLib/pnAsyncCoreExe/Private/Win32/pnAceW32Thread.cpp @@ -104,8 +104,6 @@ AsyncThreadTaskList::~AsyncThreadTaskList () { //=========================================================================== static unsigned THREADCALL ThreadTaskProc (AsyncThread * thread) { - REF(thread); - PerfAddCounter(kAsyncPerfThreadTaskThreadsActive, 1); for (;;) { @@ -266,7 +264,6 @@ void AsyncThreadTaskAdd ( ASSERT(taskList); ASSERT(callback); ASSERT(priority == kThreadTaskPriorityNormal); - REF(priority); // Allocate a new task record ThreadTask * task = NEW(ThreadTask); diff --git a/Sources/Plasma/NucleusLib/pnAsyncCoreExe/pnAceCore.cpp b/Sources/Plasma/NucleusLib/pnAsyncCoreExe/pnAceCore.cpp index 77de3fd5..3d204ef1 100644 --- a/Sources/Plasma/NucleusLib/pnAsyncCoreExe/pnAceCore.cpp +++ b/Sources/Plasma/NucleusLib/pnAsyncCoreExe/pnAceCore.cpp @@ -91,7 +91,6 @@ static void DoTransgamingCheck () { //=========================================================================== static void IAsyncInitUseW9x () { - REF(IAsyncInitUseW9x); #ifdef HS_BUILD_FOR_WIN32 W9xGetApi(&g_api); #else @@ -101,7 +100,6 @@ static void IAsyncInitUseW9x () { //=========================================================================== static void IAsyncInitUseNt () { - REF(IAsyncInitUseNt); #ifdef HS_BUILD_FOR_WIN32 NtGetApi(&g_api); #else @@ -111,7 +109,6 @@ static void IAsyncInitUseNt () { //=========================================================================== static void IAsyncInitUseUnix () { - REF(IAsyncInitUseUnix); #ifdef HS_BUILD_FOR_UNIX #error Unix I/O not implemented yet UxGetApi(&g_api); @@ -122,7 +119,6 @@ static void IAsyncInitUseUnix () { //=========================================================================== static void IAsyncInitForClient () { - REF(IAsyncInitForClient); #ifdef HS_BUILD_FOR_WIN32 DoTransgamingCheck(); if (s_transgaming) { @@ -140,7 +136,6 @@ static void IAsyncInitForClient () { //=========================================================================== static void IAsyncInitForServer () { - REF(IAsyncInitForServer); #ifdef HS_BUILD_FOR_WIN32 IAsyncInitUseNt(); #elif HS_BUILD_FOR_UNIX diff --git a/Sources/Plasma/NucleusLib/pnAsyncCoreExe/pnAceLog.cpp b/Sources/Plasma/NucleusLib/pnAsyncCoreExe/pnAceLog.cpp index 961be303..00315ed4 100644 --- a/Sources/Plasma/NucleusLib/pnAsyncCoreExe/pnAceLog.cpp +++ b/Sources/Plasma/NucleusLib/pnAsyncCoreExe/pnAceLog.cpp @@ -143,9 +143,6 @@ static void LogFileNotifyProc ( AsyncNotifyFile * notify, void ** userState ) { - REF(file); - REF(userState); - switch (code) { case kNotifyFileWrite: FREE(notify->param); @@ -163,8 +160,6 @@ static void LogFileNotifyProc ( //============================================================================ static void AllocLogBuffer_CS (unsigned index) { - REF(AllocLogBuffer_CS); - ASSERT(!s_logBuf[index]); s_logBuf[index] = (char *)ALLOC(s_logSize[index]); s_logPos[index] = 0; @@ -175,8 +170,6 @@ static void AllocLogBuffer_CS (unsigned index) { //============================================================================ static void FreeLogBuffer_CS (unsigned index) { - REF(FreeLogBuffer_CS); - if (s_logBuf[index]) { FREE(s_logBuf[index]); s_logBuf[index] = nil; @@ -322,8 +315,6 @@ static void FlushLogFile_CS ( unsigned index, TimeDesc timeDesc ) { - REF(FlushLogFile_CS); - bool close = !s_running || (s_logTime[index].day != timeDesc.day); WriteLogFile_CS(index, close); if (close) @@ -332,8 +323,6 @@ static void FlushLogFile_CS ( //============================================================================ static unsigned FlushLogsTimerCallback (void *) { - REF(FlushLogsTimerCallback); - AsyncLogFlush(); return kAsyncTimeInfinite; } @@ -427,10 +416,6 @@ void AsyncLogWriteMsg ( ELogSeverity severity, const wchar msg[] ) { - REF(facility); - REF(severity); - REF(msg); - if (!s_running) return; diff --git a/Sources/Plasma/NucleusLib/pnIni/Private/pnIniCore.cpp b/Sources/Plasma/NucleusLib/pnIni/Private/pnIniCore.cpp index 376181b3..28dd7218 100644 --- a/Sources/Plasma/NucleusLib/pnIni/Private/pnIniCore.cpp +++ b/Sources/Plasma/NucleusLib/pnIni/Private/pnIniCore.cpp @@ -741,9 +741,6 @@ unsigned IniGetBoundedValue ( unsigned maxVal, unsigned defVal ) { - REF(key); - REF(section); - if (!value) return defVal; diff --git a/Sources/Plasma/NucleusLib/pnIniExe/Private/Win32/pnW32IniChange.cpp b/Sources/Plasma/NucleusLib/pnIniExe/Private/Win32/pnW32IniChange.cpp index ba3d6393..91bdb8fe 100644 --- a/Sources/Plasma/NucleusLib/pnIniExe/Private/Win32/pnW32IniChange.cpp +++ b/Sources/Plasma/NucleusLib/pnIniExe/Private/Win32/pnW32IniChange.cpp @@ -126,8 +126,6 @@ static void ChangeDispatch_WL (IniChangeReg * marker) { //=========================================================================== static unsigned THREADCALL IniSrvThreadProc (AsyncThread * thread) { - REF(thread); - IniChangeReg marker; marker.fNotify = nil; s_lock.EnterWrite(); diff --git a/Sources/Plasma/NucleusLib/pnNetCli/pnNcCli.cpp b/Sources/Plasma/NucleusLib/pnNetCli/pnNcCli.cpp index faaf0477..3733e1a0 100644 --- a/Sources/Plasma/NucleusLib/pnNetCli/pnNcCli.cpp +++ b/Sources/Plasma/NucleusLib/pnNetCli/pnNcCli.cpp @@ -143,7 +143,6 @@ namespace pnNetCli { static void PutBufferOnWire (NetCli * cli, void * data, unsigned bytes) { byte * temp, * heap = NULL; - REF(temp); if (cli->mode == kNetCliModeEncrypted) { // Encrypt data... @@ -240,7 +239,6 @@ static void BufferedSendData ( return; unsigned_ptr const * const msgEnd = msg + fieldCount; - REF(msgEnd); const NetMsgInitSend * sendMsg = NetMsgChannelFindSendMessage(cli->channel, msg[0]); ASSERT(msg[0] == sendMsg->msg.messageId); @@ -1006,7 +1004,6 @@ bool NetCliDispatch ( if (cli->mode == kNetCliModeEncrypted) { // Decrypt data... byte * temp, * heap = NULL; - REF(temp); #ifndef NO_ENCRYPTION if (bytes <= 2048) @@ -1024,7 +1021,6 @@ bool NetCliDispatch ( // Add data to accumulator and dispatch cli->input.Add(bytes, data); bool result = DispatchData(cli, param); - REF(result); #ifdef SERVER cli->recvDispatch = result; diff --git a/Sources/Plasma/NucleusLib/pnNetDiag/pnNdDns.cpp b/Sources/Plasma/NucleusLib/pnNetDiag/pnNdDns.cpp index 2be2f33e..17e22775 100644 --- a/Sources/Plasma/NucleusLib/pnNetDiag/pnNdDns.cpp +++ b/Sources/Plasma/NucleusLib/pnNetDiag/pnNdDns.cpp @@ -78,8 +78,6 @@ static void LookupCallback ( unsigned addrCount, const NetAddress addrs[] ) { - REF(name); - DNSParam * p = (DNSParam *)param; if (addrCount) { unsigned node = NetAddressGetNode(addrs[0]); diff --git a/Sources/Plasma/NucleusLib/pnNetDiag/pnNdTcp.cpp b/Sources/Plasma/NucleusLib/pnNetDiag/pnNdTcp.cpp index 1abd4cae..4a211bea 100644 --- a/Sources/Plasma/NucleusLib/pnNetDiag/pnNdTcp.cpp +++ b/Sources/Plasma/NucleusLib/pnNetDiag/pnNdTcp.cpp @@ -154,8 +154,6 @@ static bool Recv_PingReply ( unsigned bytes, void * ) { - REF(bytes); - const Auth2Cli_PingReply & reply = *(const Auth2Cli_PingReply *)msg; AuthTrans * trans; @@ -415,8 +413,6 @@ static bool AuthSocketNotifyCallback ( //============================================================================ static bool Recv_File2Cli_ManifestReply (FileConn * conn, const File2Cli_ManifestReply & msg) { - REF(conn); - FileTrans * trans; s_critsect.Enter(); { diff --git a/Sources/Plasma/NucleusLib/pnNetProtocol/Private/pnNpCommon.cpp b/Sources/Plasma/NucleusLib/pnNetProtocol/Private/pnNpCommon.cpp index 3cddec0f..5175397c 100644 --- a/Sources/Plasma/NucleusLib/pnNetProtocol/Private/pnNpCommon.cpp +++ b/Sources/Plasma/NucleusLib/pnNetProtocol/Private/pnNpCommon.cpp @@ -156,8 +156,6 @@ static inline bool ICompareStringI (const T lhs[], const T rhs[]) { //============================================================================ static inline bool ICompareArray (const byte lhs[], const byte rhs[]) { - REF(lhs); - REF(rhs); return false; } diff --git a/Sources/Plasma/NucleusLib/pnSimpleNet/pnSimpleNet.cpp b/Sources/Plasma/NucleusLib/pnSimpleNet/pnSimpleNet.cpp index eecf1ca4..c8cb4e6a 100644 --- a/Sources/Plasma/NucleusLib/pnSimpleNet/pnSimpleNet.cpp +++ b/Sources/Plasma/NucleusLib/pnSimpleNet/pnSimpleNet.cpp @@ -412,8 +412,6 @@ static void AsyncLookupCallback ( unsigned addrCount, const NetAddress addrs[] ) { - REF(name); - ConnectParam * cp = (ConnectParam *)param; if (!addrCount) { diff --git a/Sources/Plasma/NucleusLib/pnUtils/Private/Win32/pnUtW32Addr.cpp b/Sources/Plasma/NucleusLib/pnUtils/Private/Win32/pnUtW32Addr.cpp index 0c875745..111a0634 100644 --- a/Sources/Plasma/NucleusLib/pnUtils/Private/Win32/pnUtW32Addr.cpp +++ b/Sources/Plasma/NucleusLib/pnUtils/Private/Win32/pnUtW32Addr.cpp @@ -101,7 +101,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com // 127.0.0.0 - 127.0.0.255 // (lowest) static int NetAddressNodeSortValueNetOrder (NetAddressNode addr) { - REF(NetAddressNodeSortValueNetOrder); // Loopback addresses if ((addr & kNetClassALoopbackMask) == (kNetClassALoopbackAddr & kNetClassALoopbackMask)) return 4; diff --git a/Sources/Plasma/NucleusLib/pnUtils/Private/pnUtArray.cpp b/Sources/Plasma/NucleusLib/pnUtils/Private/pnUtArray.cpp index 9de5653a..7fe6315d 100644 --- a/Sources/Plasma/NucleusLib/pnUtils/Private/pnUtArray.cpp +++ b/Sources/Plasma/NucleusLib/pnUtils/Private/pnUtArray.cpp @@ -93,7 +93,6 @@ unsigned CBaseArray::CalcAllocGrowth (unsigned newAlloc, unsigned oldAlloc, unsi //=========================================================================== void * CBaseArray::ReallocPtr (void * ptr, unsigned bytes) { - REF(ptr); void * newPtr = nil; if (bytes) { newPtr = ALLOCFLAGS(bytes, ARR_MEMORY_FLAGS); diff --git a/Sources/Plasma/NucleusLib/pnUtils/Private/pnUtArray.h b/Sources/Plasma/NucleusLib/pnUtils/Private/pnUtArray.h index 559c747f..58d1d905 100644 --- a/Sources/Plasma/NucleusLib/pnUtils/Private/pnUtArray.h +++ b/Sources/Plasma/NucleusLib/pnUtils/Private/pnUtArray.h @@ -291,12 +291,12 @@ template class TArrayCopyBits { public: inline static void Assign (T * dest, const T source[], unsigned count); - inline static void Construct (T * dest) { REF(dest); } - inline static void Construct (T * dest, unsigned count) { REF(dest); REF(count); } + inline static void Construct (T * dest) { } + inline static void Construct (T * dest, unsigned count) { } inline static void CopyConstruct (T * dest, const T & source); inline static void CopyConstruct (T * dest, const T source[], unsigned count); - inline static void Destruct (T * dest) { REF(dest); } - inline static void Destruct (T * dest, unsigned count) { REF(dest); REF(count); } + inline static void Destruct (T * dest) { } + inline static void Destruct (T * dest, unsigned count) { } }; //=========================================================================== @@ -378,14 +378,12 @@ void TArrayCopyObject::CopyConstruct (T * dest, const T source[], unsigned co //=========================================================================== template void TArrayCopyObject::Destruct (T * dest) { - REF(dest); dest->~T(); } //=========================================================================== template void TArrayCopyObject::Destruct (T * dest, unsigned count) { - REF(dest); for (unsigned loop = count; loop--; ) dest[loop].~T(); } diff --git a/Sources/Plasma/NucleusLib/pnUtils/Private/pnUtBase64.cpp b/Sources/Plasma/NucleusLib/pnUtils/Private/pnUtBase64.cpp index 08a234b0..f3ceaf53 100644 --- a/Sources/Plasma/NucleusLib/pnUtils/Private/pnUtBase64.cpp +++ b/Sources/Plasma/NucleusLib/pnUtils/Private/pnUtBase64.cpp @@ -107,8 +107,6 @@ unsigned Base64Encode ( ASSERT(dstChars >= Base64EncodeSize(srcChars)); ASSERT(dstData); - REF(dstChars); - const char * dstBase = dstData; const byte * srcTerm = srcData + srcChars; for (;;) switch (srcTerm - srcData) { @@ -152,7 +150,6 @@ unsigned Base64Decode ( ASSERT(srcData); ASSERT(dstChars >= Base64DecodeSize(srcChars)); ASSERT(dstData); - REF(dstChars); const byte * dstBase = dstData; const char * srcTerm = srcData + srcChars; diff --git a/Sources/Plasma/NucleusLib/pnUtils/Private/pnUtCmd.cpp b/Sources/Plasma/NucleusLib/pnUtils/Private/pnUtCmd.cpp index 59f3d555..de8cd4e7 100644 --- a/Sources/Plasma/NucleusLib/pnUtils/Private/pnUtCmd.cpp +++ b/Sources/Plasma/NucleusLib/pnUtils/Private/pnUtCmd.cpp @@ -613,15 +613,10 @@ bool CCmdParser::IsSpecified (const wchar name[]) const { //=========================================================================== void CCmdParser::OnError (const wchar str[], ECmdError errorCode, const wchar arg[], const wchar value[]) { - REF(str); - REF(errorCode); - REF(arg); - REF(value); } //=========================================================================== bool CCmdParser::OnExtra (const wchar str[]) { - REF(str); return false; } diff --git a/Sources/Plasma/NucleusLib/pnUtils/Private/pnUtCrypt.cpp b/Sources/Plasma/NucleusLib/pnUtils/Private/pnUtCrypt.cpp index b4052ef5..7f22e8de 100644 --- a/Sources/Plasma/NucleusLib/pnUtils/Private/pnUtCrypt.cpp +++ b/Sources/Plasma/NucleusLib/pnUtils/Private/pnUtCrypt.cpp @@ -159,7 +159,7 @@ static void Rc4Codec ( unsigned sourceBytes, const void * sourceData ) { - REF(encrypt); // RC4 uses the same algorithm to both encrypt and decrypt + // RC4 uses the same algorithm to both encrypt and decrypt dest->SetCount(sourceBytes); RC4((RC4_KEY *)key->handle, sourceBytes, (const unsigned char *)sourceData, dest->Ptr()); } @@ -171,7 +171,7 @@ static void Rc4Codec ( unsigned bytes, void * data ) { - REF(encrypt); // RC4 uses the same algorithm to both encrypt and decrypt + // RC4 uses the same algorithm to both encrypt and decrypt byte * temp = ALLOCA(byte, bytes); RC4((RC4_KEY *)key->handle, bytes, (const unsigned char *)data, temp); MemCopy(data, temp, bytes); @@ -181,7 +181,7 @@ static void Rc4Codec ( //=========================================================================== void KeyRc4::Codec (bool encrypt, ARRAY(byte) * dest, unsigned sourceBytes, const void * sourceData) { - REF(encrypt); // RC4 uses the same algorithm to both encrypt and decrypt + // RC4 uses the same algorithm to both encrypt and decrypt dest->SetCount(sourceBytes); byte * destDataPtr = (byte *)dest->Ptr(); @@ -381,8 +381,6 @@ void CryptKeyGenerate ( break; case kCryptRsa: - REF(keyBits); - REF(publicData); #if 0 KeyRsa::KeyGen( keyBits, diff --git a/Sources/Plasma/NucleusLib/pnUtils/Private/pnUtEndian.h b/Sources/Plasma/NucleusLib/pnUtils/Private/pnUtEndian.h index d11b96fa..ec29fa88 100644 --- a/Sources/Plasma/NucleusLib/pnUtils/Private/pnUtEndian.h +++ b/Sources/Plasma/NucleusLib/pnUtils/Private/pnUtEndian.h @@ -90,8 +90,6 @@ inline void EndianConvert ( word * array, unsigned count ) { - REF(array); - REF(count); return; } @@ -100,8 +98,6 @@ inline void EndianConvert ( dword * array, unsigned count ) { - REF(array); - REF(count); return; } @@ -110,8 +106,6 @@ inline void EndianConvert ( qword * array, unsigned count ) { - REF(array); - REF(count); return; } @@ -121,9 +115,6 @@ inline void EndianConvert ( unsigned elemCount, unsigned elemBytes ) { - REF(data); - REF(elemCount); - REF(elemBytes); return; } diff --git a/Sources/Plasma/NucleusLib/pnUtils/Private/pnUtHash.h b/Sources/Plasma/NucleusLib/pnUtils/Private/pnUtHash.h index 4609cecc..e5260474 100644 --- a/Sources/Plasma/NucleusLib/pnUtils/Private/pnUtHash.h +++ b/Sources/Plasma/NucleusLib/pnUtils/Private/pnUtHash.h @@ -219,7 +219,6 @@ TBaseHashTable::TBaseHashTable () { //=========================================================================== template TBaseHashTable::TBaseHashTable (const TBaseHashTable & source) { - REF(source); #ifdef HS_DEBUGGING FATAL("No copy constructor"); #endif @@ -229,7 +228,6 @@ TBaseHashTable::TBaseHashTable (const TBaseHashTable & source) { //=========================================================================== template TBaseHashTable & TBaseHashTable::operator= (const TBaseHashTable & source) { - REF(source); #ifdef HS_DEBUGGING FATAL("No assignment operator"); #endif @@ -345,7 +343,6 @@ const T * TBaseHashTable::Next (const T * object) const { template void TBaseHashTable::Order (T * linkedObject, ELinkType linkType, T * existingObject) { THashLink & link = GetLink(linkedObject); - REF(link); ASSERT(link.m_linkToFull.IsLinked()); m_fullList.Link(linkedObject, linkType, existingObject); } diff --git a/Sources/Plasma/NucleusLib/pnUtils/Private/pnUtList.h b/Sources/Plasma/NucleusLib/pnUtils/Private/pnUtList.h index 275b9084..7b1be3cd 100644 --- a/Sources/Plasma/NucleusLib/pnUtils/Private/pnUtList.h +++ b/Sources/Plasma/NucleusLib/pnUtils/Private/pnUtList.h @@ -138,7 +138,6 @@ CBaseLink::CBaseLink () { //=========================================================================== CBaseLink::CBaseLink (const CBaseLink & source) { - REF(source); #ifdef HS_DEBUGGING if (source.IsLinked()) FATAL("No copy constructor"); @@ -153,7 +152,6 @@ CBaseLink::~CBaseLink () { //=========================================================================== CBaseLink & CBaseLink::operator= (const CBaseLink & source) { - REF(source); #ifdef HS_DEBUGGING FATAL("No assignment operator"); #endif @@ -364,7 +362,6 @@ CBaseList::CBaseList () { //=========================================================================== CBaseList::CBaseList (const CBaseList & source) { m_linkOffset = LINK_OFFSET_UNINIT; - REF(source); } //=========================================================================== @@ -375,7 +372,6 @@ CBaseList::~CBaseList () { //=========================================================================== CBaseList & CBaseList::operator= (const CBaseList & source) { - REF(source); return *this; } diff --git a/Sources/Plasma/NucleusLib/pnUtils/Private/pnUtRef.h b/Sources/Plasma/NucleusLib/pnUtils/Private/pnUtRef.h index 8c0dca74..909f3448 100644 --- a/Sources/Plasma/NucleusLib/pnUtils/Private/pnUtRef.h +++ b/Sources/Plasma/NucleusLib/pnUtils/Private/pnUtRef.h @@ -102,7 +102,6 @@ public: ASSERT(!zeroed); #endif long prev = AtomicAdd(&m_ref, 1); - REF(tag); REFTRACE("Inc %p %s: %u", this, tag, prev+1); return prev+1; } @@ -119,7 +118,6 @@ public: ASSERT(!zeroed); #endif long prev = AtomicAdd(&m_ref, n); - REF(tag); REFTRACE("Inc %p %s: %u", this, tag, prev+n); return prev+n; } @@ -149,7 +147,6 @@ public: #endif OnZeroRef(); } - REF(tag); REFTRACE("Dec %p %s: %u", this, tag, prev-1); return prev-1; } @@ -161,8 +158,6 @@ public: #ifdef HS_DEBUGGING ASSERT(!zeroed); #endif - REF(oldTag); - REF(newTag); REFTRACE("Inc %p %s: (xfer)", this, newTag); REFTRACE("Dec %p %s: (xfer)", this, oldTag); } diff --git a/Sources/Plasma/NucleusLib/pnUtils/Private/pnUtSpareList.cpp b/Sources/Plasma/NucleusLib/pnUtils/Private/pnUtSpareList.cpp index 34a8644f..9259627e 100644 --- a/Sources/Plasma/NucleusLib/pnUtils/Private/pnUtSpareList.cpp +++ b/Sources/Plasma/NucleusLib/pnUtils/Private/pnUtSpareList.cpp @@ -92,8 +92,6 @@ void CBaseSpareList::Free (void * object, unsigned objectSize) { // initialize memory to a freaky value in debug mode #ifdef HS_DEBUGGING MemSet(object, (byte) ((unsigned) object >> 4), objectSize); - #else - REF(objectSize); #endif // link memory block onto head of spare list @@ -156,8 +154,6 @@ void CBaseSpareList::CleanUp (const char typeName[]) { } #endif } - #else - REF(typeName); #endif // walk chain of AllocNodes and free each of them diff --git a/Sources/Plasma/NucleusLib/pnUtils/Private/pnUtUuid.h b/Sources/Plasma/NucleusLib/pnUtils/Private/pnUtUuid.h index 2d6742cf..677435f7 100644 --- a/Sources/Plasma/NucleusLib/pnUtils/Private/pnUtUuid.h +++ b/Sources/Plasma/NucleusLib/pnUtils/Private/pnUtUuid.h @@ -110,9 +110,9 @@ struct Uuid { inline bool operator ! () const { return GuidIsNil(*this); } inline bool operator < (const Uuid & rhs) const { return GuidCompare(*this, rhs) < 0; } inline bool operator == (const Uuid & rhs) const { return GuidsAreEqual(*this, rhs); } - inline bool operator == (int rhs) const { REF(rhs); ASSERT(!rhs); return GuidsAreEqual(*this, kNilGuid); } + inline bool operator == (int rhs) const { ASSERT(!rhs); return GuidsAreEqual(*this, kNilGuid); } inline bool operator != (const Uuid & rhs) const { return !GuidsAreEqual(*this, rhs); } - inline bool operator != (int rhs) const { REF(rhs); ASSERT(!rhs); return !GuidsAreEqual(*this, kNilGuid); } + inline bool operator != (int rhs) const { ASSERT(!rhs); return !GuidsAreEqual(*this, kNilGuid); } }; #include diff --git a/Sources/Plasma/PubUtilLib/plNetCommon/plNetCommon.h b/Sources/Plasma/PubUtilLib/plNetCommon/plNetCommon.h index 755ac8b3..f212068f 100644 --- a/Sources/Plasma/PubUtilLib/plNetCommon/plNetCommon.h +++ b/Sources/Plasma/PubUtilLib/plNetCommon/plNetCommon.h @@ -57,8 +57,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #define kNeighborhoodAgeFilename "Neighborhood" #define kNeighborhoodAgeFilenameW L"Neighborhood" -#define kNeighborhoodAgeInstanceName "Hood" -#define kNeighborhoodAgeInstanceNameW L"Hood" +#define kNeighborhoodAgeInstanceName "Bevin" +#define kNeighborhoodAgeInstanceNameW L"Bevin" #define kStartupNeighborhoodUserDefinedName "DRC" #define kStartupNeighborhoodUserDefinedNameW L"DRC" diff --git a/Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglAuth.cpp b/Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglAuth.cpp index 8585cdc6..a55b6950 100644 --- a/Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglAuth.cpp +++ b/Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglAuth.cpp @@ -1550,8 +1550,6 @@ static void AsyncLookupCallback ( unsigned addrCount, const NetAddress addrs[] ) { - REF(param); - if (!addrCount) { ReportNetError(kNetProtocolCli2Auth, kNetErrNameLookupFailed); return; @@ -2005,9 +2003,6 @@ static bool Recv_KickedOff ( unsigned bytes, void * param ) { - REF(bytes); - REF(param); - const Auth2Cli_KickedOff & msg = *(const Auth2Cli_KickedOff *)buffer; ReportNetError(kNetProtocolCli2Auth, msg.reason); @@ -2538,8 +2533,6 @@ bool PingRequestTrans::Recv ( const byte msg[], unsigned bytes ) { - REF(bytes); - const Auth2Cli_PingReply & reply = *(const Auth2Cli_PingReply *)msg; m_payload.Set(reply.payload, reply.payloadBytes); @@ -2601,8 +2594,6 @@ bool AccountExistsRequestTrans::Recv ( const byte msg[], unsigned bytes ) { - REF(bytes); - const Auth2Cli_AccountExistsReply & reply = *(const Auth2Cli_AccountExistsReply *)msg; m_exists = reply.exists; @@ -2710,8 +2701,6 @@ bool LoginRequestTrans::Recv ( const byte msg[], unsigned bytes ) { - REF(bytes); - dword msgId = (dword)*msg; switch (msgId) { case kAuth2Cli_AcctPlayerInfo: { @@ -2799,7 +2788,6 @@ bool AgeRequestTrans::Recv ( const byte msg[], unsigned bytes ) { - REF(bytes); const Auth2Cli_AgeReply & reply = *(const Auth2Cli_AgeReply *) msg; m_gameSrvNode = reply.gameSrvNode; m_ageMcpId = reply.ageMcpId; @@ -2872,7 +2860,6 @@ bool AccountCreateRequestTrans::Recv ( const byte msg[], unsigned bytes ) { - REF(bytes); const Auth2Cli_AcctCreateReply & reply = *(const Auth2Cli_AcctCreateReply *) msg; m_result = reply.result; @@ -2944,7 +2931,6 @@ bool AccountCreateFromKeyRequestTrans::Recv ( const byte msg[], unsigned bytes ) { - REF(bytes); const Auth2Cli_AcctCreateFromKeyReply & reply = *(const Auth2Cli_AcctCreateFromKeyReply *) msg; m_result = reply.result; @@ -3012,7 +2998,6 @@ bool PlayerCreateRequestTrans::Recv ( const byte msg[], unsigned bytes ) { - REF(bytes); const Auth2Cli_PlayerCreateReply & reply = *(const Auth2Cli_PlayerCreateReply *) msg; if (!IS_NET_ERROR(reply.result)) { m_playerInfo.playerInt = reply.playerInt; @@ -3179,7 +3164,6 @@ bool SetPlayerRequestTrans::Recv ( const byte msg[], unsigned bytes ) { - REF(bytes); const Auth2Cli_AcctSetPlayerReply & reply = *(const Auth2Cli_AcctSetPlayerReply *) msg; m_result = reply.result; m_state = kTransStateComplete; @@ -3241,7 +3225,6 @@ bool AccountChangePasswordRequestTrans::Recv ( const byte msg[], unsigned bytes ) { - REF(bytes); const Auth2Cli_AcctChangePasswordReply & reply = *(const Auth2Cli_AcctChangePasswordReply *) msg; m_result = reply.result; @@ -3297,7 +3280,6 @@ bool GetPublicAgeListTrans::Recv ( const byte msg[], unsigned bytes ) { - REF(bytes); const Auth2Cli_PublicAgeList & reply = *(const Auth2Cli_PublicAgeList *) msg; if (IS_NET_SUCCESS(reply.result)) @@ -3359,7 +3341,6 @@ bool AccountSetRolesRequestTrans::Recv ( const byte msg[], unsigned bytes ) { - REF(bytes); const Auth2Cli_AcctSetRolesReply & reply = *(const Auth2Cli_AcctSetRolesReply *) msg; m_result = reply.result; @@ -3417,7 +3398,6 @@ bool AccountSetBillingTypeRequestTrans::Recv ( const byte msg[], unsigned bytes ) { - REF(bytes); const Auth2Cli_AcctSetBillingTypeReply & reply = *(const Auth2Cli_AcctSetBillingTypeReply *) msg; m_result = reply.result; @@ -3472,7 +3452,6 @@ bool AccountActivateRequestTrans::Recv ( const byte msg[], unsigned bytes ) { - REF(bytes); const Auth2Cli_AcctActivateReply & reply = *(const Auth2Cli_AcctActivateReply *) msg; m_result = reply.result; @@ -3527,7 +3506,6 @@ bool FileListRequestTrans::Recv ( const byte msg[], unsigned bytes ) { - REF(bytes); const Auth2Cli_FileListReply & reply = *(const Auth2Cli_FileListReply *) msg; dword wcharCount = reply.wcharCount; @@ -3643,7 +3621,6 @@ bool FileDownloadRequestTrans::Recv ( const byte msg[], unsigned bytes ) { - REF(bytes); const Auth2Cli_FileDownloadChunk & reply = *(const Auth2Cli_FileDownloadChunk *) msg; if (IS_NET_ERROR(reply.result)) { @@ -3978,8 +3955,6 @@ bool VaultFetchNodeTrans::Recv ( const byte msg[], unsigned bytes ) { - REF(bytes); - const Auth2Cli_VaultNodeFetched & reply = *(const Auth2Cli_VaultNodeFetched *) msg; if (IS_NET_SUCCESS(reply.result)) { @@ -4056,8 +4031,6 @@ bool VaultFindNodeTrans::Recv ( const byte msg[], unsigned bytes ) { - REF(bytes); - const Auth2Cli_VaultNodeFindReply & reply = *(const Auth2Cli_VaultNodeFindReply *) msg; if (IS_NET_SUCCESS(reply.result)) { @@ -4126,8 +4099,6 @@ bool VaultCreateNodeTrans::Recv ( const byte msg[], unsigned bytes ) { - REF(bytes); - const Auth2Cli_VaultNodeCreated & reply = *(const Auth2Cli_VaultNodeCreated *) msg; if (IS_NET_SUCCESS(reply.result)) @@ -4196,8 +4167,6 @@ bool VaultSaveNodeTrans::Recv ( const byte msg[], unsigned bytes ) { - REF(bytes); - const Auth2Cli_VaultSaveNodeReply & reply = *(const Auth2Cli_VaultSaveNodeReply *) msg; m_result = reply.result; @@ -4261,8 +4230,6 @@ bool VaultAddNodeTrans::Recv ( const byte msg[], unsigned bytes ) { - REF(bytes); - const Auth2Cli_VaultAddNodeReply & reply = *(const Auth2Cli_VaultAddNodeReply *) msg; m_result = reply.result; @@ -4323,8 +4290,6 @@ bool VaultRemoveNodeTrans::Recv ( const byte msg[], unsigned bytes ) { - REF(bytes); - const Auth2Cli_VaultRemoveNodeReply & reply = *(const Auth2Cli_VaultRemoveNodeReply *) msg; m_result = reply.result; @@ -4396,7 +4361,6 @@ bool SetPlayerBanStatusRequestTrans::Recv ( const byte msg[], unsigned bytes ) { - REF(bytes); const Auth2Cli_SetPlayerBanStatusReply & reply = *(const Auth2Cli_SetPlayerBanStatusReply *) msg; m_result = reply.result; @@ -4454,7 +4418,6 @@ bool ChangePlayerNameRequestTrans::Recv ( const byte msg[], unsigned bytes ) { - REF(bytes); const Auth2Cli_ChangePlayerNameReply & reply = *(const Auth2Cli_ChangePlayerNameReply *) msg; m_result = reply.result; @@ -4516,7 +4479,6 @@ bool SendFriendInviteTrans::Recv ( const byte msg[], unsigned bytes ) { - REF(bytes); const Auth2Cli_SendFriendInviteReply & reply = *(const Auth2Cli_SendFriendInviteReply *) msg; m_result = reply.result; @@ -4607,7 +4569,6 @@ bool ScoreCreateTrans::Recv ( const byte msg[], unsigned bytes ) { - REF(bytes); const Auth2Cli_ScoreCreateReply & reply = *(const Auth2Cli_ScoreCreateReply *) msg; m_scoreId = reply.scoreId; @@ -4667,7 +4628,6 @@ bool ScoreDeleteTrans::Recv ( const byte msg[], unsigned bytes ) { - REF(bytes); const Auth2Cli_ScoreDeleteReply & reply = *(const Auth2Cli_ScoreDeleteReply *) msg; m_result = reply.result; @@ -4734,7 +4694,6 @@ bool ScoreGetScoresTrans::Recv ( const byte msg[], unsigned bytes ) { - REF(bytes); const Auth2Cli_ScoreGetScoresReply & reply = *(const Auth2Cli_ScoreGetScoresReply *) msg; if (reply.scoreCount > 0) { @@ -4810,7 +4769,6 @@ bool ScoreAddPointsTrans::Recv ( const byte msg[], unsigned bytes ) { - REF(bytes); const Auth2Cli_ScoreAddPointsReply & reply = *(const Auth2Cli_ScoreAddPointsReply *) msg; m_result = reply.result; @@ -4873,7 +4831,6 @@ bool ScoreTransferPointsTrans::Recv ( const byte msg[], unsigned bytes ) { - REF(bytes); const Auth2Cli_ScoreTransferPointsReply & reply = *(const Auth2Cli_ScoreTransferPointsReply *) msg; m_result = reply.result; @@ -4933,7 +4890,6 @@ bool ScoreSetPointsTrans::Recv ( const byte msg[], unsigned bytes ) { - REF(bytes); const Auth2Cli_ScoreSetPointsReply & reply = *(const Auth2Cli_ScoreSetPointsReply *) msg; m_result = reply.result; @@ -5014,7 +4970,6 @@ bool ScoreGetRanksTrans::Recv ( const byte msg[], unsigned bytes ) { - REF(bytes); const Auth2Cli_ScoreGetRanksReply & reply = *(const Auth2Cli_ScoreGetRanksReply *) msg; if (reply.rankCount > 0) { @@ -5719,7 +5674,6 @@ unsigned NetCliAuthVaultNodeSave ( void NetCliAuthVaultNodeDelete ( unsigned nodeId ) { - REF(nodeId); hsAssert(false, "eric, implement me"); } @@ -5852,7 +5806,6 @@ void NetCliAuthSetRecvBufferHandler ( void NetCliAuthSendCCRPetition ( const wchar * petitionText ) { - REF(petitionText); hsAssert(false, "eric, implement me."); } diff --git a/Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglFile.cpp b/Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglFile.cpp index 0193ada6..c2d6a32c 100644 --- a/Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglFile.cpp +++ b/Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglFile.cpp @@ -563,8 +563,6 @@ static void AsyncLookupCallback ( unsigned addrCount, const NetAddress addrs[] ) { - REF(param); - if (!addrCount) { ReportNetError(kNetProtocolCli2File, kNetErrNameLookupFailed); return; @@ -793,7 +791,6 @@ void CliFileConn::Dispatch (const Cli2File_MsgHeader * msg) { bool CliFileConn::Recv_PingReply ( const File2Cli_PingReply * msg ) { - REF(msg); return true; } @@ -874,7 +871,6 @@ bool BuildIdRequestTrans::Recv ( const byte msg[], unsigned bytes ) { - REF(bytes); const File2Cli_BuildIdReply & reply = *(const File2Cli_BuildIdReply *) msg; if (IS_NET_ERROR(reply.result)) { @@ -960,7 +956,6 @@ bool ManifestRequestTrans::Recv ( ) { m_timeoutAtMs = TimeGetMs() + NetTransGetTimeoutMs(); // Reset the timeout counter - REF(bytes); const File2Cli_ManifestReply & reply = *(const File2Cli_ManifestReply *) msg; dword numFiles = reply.numFiles; @@ -1173,7 +1168,6 @@ bool DownloadRequestTrans::Recv ( ) { m_timeoutAtMs = TimeGetMs() + NetTransGetTimeoutMs(); // Reset the timeout counter - REF(bytes); const File2Cli_FileDownloadReply & reply = *(const File2Cli_FileDownloadReply *) msg; dword byteCount = reply.byteCount; diff --git a/Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglGame.cpp b/Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglGame.cpp index 83ae03ad..86332ca7 100644 --- a/Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglGame.cpp +++ b/Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglGame.cpp @@ -430,9 +430,6 @@ static bool Recv_PingReply ( unsigned bytes, void * param ) { - REF(msg); - REF(bytes); - REF(param); return true; } @@ -442,9 +439,6 @@ static bool Recv_JoinAgeReply ( unsigned bytes, void * param ) { - REF(bytes); - REF(param); - const Game2Cli_JoinAgeReply & reply = *(const Game2Cli_JoinAgeReply *)msg; if (sizeof(reply) != bytes) return false; @@ -460,9 +454,6 @@ static bool Recv_PropagateBuffer ( unsigned bytes, void * param ) { - REF(bytes); - REF(param); - const Game2Cli_PropagateBuffer & reply = *(const Game2Cli_PropagateBuffer *)msg; RcvdPropagatedBufferTrans * trans = NEW(RcvdPropagatedBufferTrans); @@ -481,9 +472,6 @@ static bool Recv_GameMgrMsg ( unsigned bytes, void * param ) { - REF(bytes); - REF(param); - const Game2Cli_GameMgrMsg & reply = *(const Game2Cli_GameMgrMsg *)msg; RcvdGameMgrMsgTrans * trans = NEW(RcvdGameMgrMsgTrans); @@ -571,8 +559,6 @@ bool JoinAgeRequestTrans::Recv ( const byte msg[], unsigned bytes ) { - REF(bytes); - const Game2Cli_JoinAgeReply & reply = *(const Game2Cli_JoinAgeReply *) msg; m_result = reply.result; m_state = kTransStateComplete; diff --git a/Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglGateKeeper.cpp b/Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglGateKeeper.cpp index a168ec97..d9e55e7c 100644 --- a/Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglGateKeeper.cpp +++ b/Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglGateKeeper.cpp @@ -488,8 +488,6 @@ static void AsyncLookupCallback ( unsigned addrCount, const NetAddress addrs[] ) { - REF(param); - if (!addrCount) { ReportNetError(kNetProtocolCli2GateKeeper, kNetErrNameLookupFailed); return; @@ -818,8 +816,6 @@ bool PingRequestTrans::Recv ( const byte msg[], unsigned bytes ) { - REF(bytes); - const GateKeeper2Cli_PingReply & reply = *(const GateKeeper2Cli_PingReply *)msg; m_payload.Set(reply.payload, reply.payloadBytes); @@ -882,8 +878,6 @@ bool FileSrvIpAddressRequestTrans::Recv ( const byte msg[], unsigned bytes ) { - REF(bytes); - const GateKeeper2Cli_FileSrvIpAddressReply & reply = *(const GateKeeper2Cli_FileSrvIpAddressReply *)msg; @@ -942,8 +936,6 @@ bool AuthSrvIpAddressRequestTrans::Recv ( const byte msg[], unsigned bytes ) { - REF(bytes); - const GateKeeper2Cli_AuthSrvIpAddressReply & reply = *(const GateKeeper2Cli_AuthSrvIpAddressReply *)msg; m_result = kNetSuccess; From 3cbf675476aeb8fe6849fdfcbe87abf2e80eab58 Mon Sep 17 00:00:00 2001 From: Zrax Date: Wed, 6 Apr 2011 21:22:04 -0600 Subject: [PATCH 3/8] Missed some "ref macro" uses (cherry picked from commit c8cee29c7837a2ee1458839ce502407a783047e7) --- .../Plasma/PubUtilLib/plNetClientComm/plNetClientComm.cpp | 4 ---- Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglCsr.cpp | 6 ------ 2 files changed, 10 deletions(-) diff --git a/Sources/Plasma/PubUtilLib/plNetClientComm/plNetClientComm.cpp b/Sources/Plasma/PubUtilLib/plNetClientComm/plNetClientComm.cpp index 3ebb2dc0..135be4de 100644 --- a/Sources/Plasma/PubUtilLib/plNetClientComm/plNetClientComm.cpp +++ b/Sources/Plasma/PubUtilLib/plNetClientComm/plNetClientComm.cpp @@ -448,8 +448,6 @@ static void INetCliAuthCreatePlayerRequestCallback ( void * param, const NetCliAuthPlayerInfo & playerInfo ) { - REF(param); - if (IS_NET_ERROR(result)) { LogMsg(kLogDebug, L"Create player failed: %s", NetErrorToString(result)); } @@ -522,8 +520,6 @@ static void INetCliAuthChangePasswordCallback ( ENetError result, void * param ) { - REF(param); - if (IS_NET_ERROR(result)) { LogMsg(kLogDebug, L"Change password failed: %s", NetErrorToString(result)); } diff --git a/Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglCsr.cpp b/Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglCsr.cpp index 7c1e04da..8a9c5be5 100644 --- a/Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglCsr.cpp +++ b/Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglCsr.cpp @@ -187,8 +187,6 @@ static CliCsConn * GetConnIncRef_CS (const char tag[]) { //============================================================================ static CliCsConn * GetConnIncRef (const char tag[]) { - REF(GetConnIncRef); - CliCsConn * conn; s_critsect.Enter(); { @@ -420,8 +418,6 @@ static void AsyncLookupCallback ( unsigned addrCount, const NetAddress addrs[] ) { - REF(name); - if (!addrCount) { ReportNetError(kNetProtocolCli2Auth, kNetErrNameLookupFailed); return; @@ -697,8 +693,6 @@ bool LoginRequestTrans::Recv ( const byte msg[], unsigned bytes ) { - REF(bytes); - const Csr2Cli_LoginReply & reply = *(const Csr2Cli_LoginReply *) msg; m_result = reply.result; From e43d316e7bb6faac5d3ca9075079f253f0745158 Mon Sep 17 00:00:00 2001 From: Zrax Date: Thu, 7 Apr 2011 10:16:41 -0700 Subject: [PATCH 4/8] Fix API difference for newer versions of python (cherry picked from commit 3e95f4fe5ab3ee931be72c87d905131d03cc6818) --- Sources/Plasma/FeatureLib/pfPython/cyPythonInterface.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Sources/Plasma/FeatureLib/pfPython/cyPythonInterface.cpp b/Sources/Plasma/FeatureLib/pfPython/cyPythonInterface.cpp index 1d90fd88..4c3597b4 100644 --- a/Sources/Plasma/FeatureLib/pfPython/cyPythonInterface.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/cyPythonInterface.cpp @@ -1936,7 +1936,12 @@ hsBool PythonInterface::DumpObject(PyObject* pyobj, char** pickle, Int32* size) { PyObject *s; // the python string object where the marsalled object wil go // convert object to a marshalled string python object +#if (PY_MAJOR_VERSION == 2) && (PY_MINOR_VERSION < 4) s = PyMarshal_WriteObjectToString(pyobj); +#else + s = PyMarshal_WriteObjectToString(pyobj, 0); +#endif + // did it actually do it? if ( s != NULL ) { From 329b0b2897b504230ac5f18adefdf0405ccfaa48 Mon Sep 17 00:00:00 2001 From: Zrax Date: Thu, 7 Apr 2011 11:57:42 -0700 Subject: [PATCH 5/8] Fix some conformance-based compiler warnings (cherry picked from commit 3a57088bcff9ec685d2aff0f8c266073bca40682) --- Sources/Plasma/CoreLib/hsUtils.h | 13 +++++++++++++ .../pfGameMgr/BlueSpiral/pfGmBlueSpiral.cpp | 2 +- .../Plasma/FeatureLib/pfPython/plPythonFileMod.cpp | 2 +- .../FeatureLib/pfPython/pyDynamicTextGlue.cpp | 6 +++--- .../FeatureLib/pfPython/pyGUIControlListBox.cpp | 5 +++-- Sources/Plasma/FeatureLib/pfPython/pyImage.cpp | 2 +- 6 files changed, 22 insertions(+), 8 deletions(-) diff --git a/Sources/Plasma/CoreLib/hsUtils.h b/Sources/Plasma/CoreLib/hsUtils.h index 43022e50..cce05ec9 100644 --- a/Sources/Plasma/CoreLib/hsUtils.h +++ b/Sources/Plasma/CoreLib/hsUtils.h @@ -60,6 +60,19 @@ void hsStrLower(char *s); char * hsFormatStr(const char * fmt, ...); // You are responsible for returned memory. char * hsFormatStrV(const char * fmt, va_list args); // You are responsible for returned memory. +// Use "correct" stricmp based on the selected compiler / library +#ifdef _MSC_VER +#define stricmp _stricmp +#define strnicmp _strnicmp +#define wcsicmp _wcsicmp +#define wcsnicmp _wcsnicmp +#else +#define stricmp strcasecmp +#define strnicmp strncasecmp +#define wcsicmp wcscasecmp +#define wcsnicmp wcsncasecmp +#endif + // A pstring has a length byte at the beginning, and no trailing 0 char* hsP2CString(const UInt8 pstring[], char cstring[]); diff --git a/Sources/Plasma/FeatureLib/pfGameMgr/BlueSpiral/pfGmBlueSpiral.cpp b/Sources/Plasma/FeatureLib/pfGameMgr/BlueSpiral/pfGmBlueSpiral.cpp index b37256d1..88edb46e 100644 --- a/Sources/Plasma/FeatureLib/pfGameMgr/BlueSpiral/pfGmBlueSpiral.cpp +++ b/Sources/Plasma/FeatureLib/pfGameMgr/BlueSpiral/pfGmBlueSpiral.cpp @@ -269,7 +269,7 @@ void pfGmBlueSpiral::HitCloth (int clothNum) { msg.messageBytes = sizeof(msg); msg.recvGameId = GetGameId(); // send to GameSrv on server msg.transId = 0; - msg.clothNum = clothNum; + msg.clothNum = (byte)clothNum; GameMgrSend(&msg); } diff --git a/Sources/Plasma/FeatureLib/pfPython/plPythonFileMod.cpp b/Sources/Plasma/FeatureLib/pfPython/plPythonFileMod.cpp index ca1ec5fb..a24ff9ed 100644 --- a/Sources/Plasma/FeatureLib/pfPython/plPythonFileMod.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/plPythonFileMod.cpp @@ -1263,7 +1263,7 @@ hsBool plPythonFileMod::MsgReceive(plMessage* msg) if (pNtfyMsg) { // remember if this was a Local Broad cast or not - fLocalNotify = (pNtfyMsg->HasBCastFlag(plMessage ::plBCastFlags::kNetNonLocal)) ? false : true; + fLocalNotify = (pNtfyMsg->HasBCastFlag(plMessage::kNetNonLocal)) ? false : true; // create a list for the event records PyObject* levents = PyList_New(0); // start with a list of no elements diff --git a/Sources/Plasma/FeatureLib/pfPython/pyDynamicTextGlue.cpp b/Sources/Plasma/FeatureLib/pfPython/pyDynamicTextGlue.cpp index 56ef4e60..3cb19340 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyDynamicTextGlue.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/pyDynamicTextGlue.cpp @@ -487,9 +487,9 @@ void pyDynamicText::AddPlasmaClasses(PyObject *m) void pyDynamicText::AddPlasmaConstantsClasses(PyObject *m) { PYTHON_ENUM_START(PtJustify); - PYTHON_ENUM_ELEMENT(PtJustify, kCenter, plDynamicTextMap::Justify::kCenter); - PYTHON_ENUM_ELEMENT(PtJustify, kLeftJustify, plDynamicTextMap::Justify::kLeftJustify); - PYTHON_ENUM_ELEMENT(PtJustify, kRightJustify, plDynamicTextMap::Justify::kRightJustify); + PYTHON_ENUM_ELEMENT(PtJustify, kCenter, plDynamicTextMap::kCenter); + PYTHON_ENUM_ELEMENT(PtJustify, kLeftJustify, plDynamicTextMap::kLeftJustify); + PYTHON_ENUM_ELEMENT(PtJustify, kRightJustify, plDynamicTextMap::kRightJustify); PYTHON_ENUM_END(m, PtJustify); PYTHON_ENUM_START(PtFontFlags); diff --git a/Sources/Plasma/FeatureLib/pfPython/pyGUIControlListBox.cpp b/Sources/Plasma/FeatureLib/pfPython/pyGUIControlListBox.cpp index 09413368..39dc711a 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyGUIControlListBox.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/pyGUIControlListBox.cpp @@ -248,8 +248,9 @@ class pfColorListElement : public pfGUIListText wchar_t* thestring; if ( fString1 && fString2 ) { - thestring = TRACKED_NEW wchar_t[ wcslen( fString1 ) + wcslen( fString2 ) + 3 ]; - swprintf( thestring, L"%s %s", fString1, fString2 ); + size_t length = wcslen( fString1 ) + wcslen( fString2 ) + 3; + thestring = TRACKED_NEW wchar_t[ length ]; + swprintf( thestring, length, L"%s %s", fString1, fString2 ); wemade_string = true; } else if (fString1) diff --git a/Sources/Plasma/FeatureLib/pfPython/pyImage.cpp b/Sources/Plasma/FeatureLib/pfPython/pyImage.cpp index 0d9fa167..64183395 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyImage.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/pyImage.cpp @@ -192,7 +192,7 @@ PyObject* pyImage::LoadJPEGFromDisk(const wchar* filename, UInt16 width, UInt16 { if (width > 0 && height > 0) { - if (!theMipmap->ResizeNicely(width, height, plMipmap::ScaleFilter::kDefaultFilter)) + if (!theMipmap->ResizeNicely(width, height, plMipmap::kDefaultFilter)) { delete theMipmap; PYTHON_RETURN_NONE; From 4320674bd8deae37d1cae3dd5b26b2b8559bc39b Mon Sep 17 00:00:00 2001 From: Zrax Date: Thu, 7 Apr 2011 16:09:08 -0600 Subject: [PATCH 6/8] Fix some more conformance difference related errors/warnings (cherry picked [partial] from commit 37a87f3b544c80d1d330992562441b5546df3c22) --- Sources/Plasma/PubUtilLib/plFile/plFileUtils.cpp | 4 ++-- Sources/Plasma/PubUtilLib/plStatusLog/plStatusLog.cpp | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Sources/Plasma/PubUtilLib/plFile/plFileUtils.cpp b/Sources/Plasma/PubUtilLib/plFile/plFileUtils.cpp index 83d98c7f..7b3a5100 100644 --- a/Sources/Plasma/PubUtilLib/plFile/plFileUtils.cpp +++ b/Sources/Plasma/PubUtilLib/plFile/plFileUtils.cpp @@ -64,6 +64,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include #include #include +#include #if HS_BUILD_FOR_WIN32 @@ -73,7 +74,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #if HS_BUILD_FOR_UNIX #include -#include #include #endif @@ -513,4 +513,4 @@ bool plFileUtils::GetSecureEncryptionKey(const wchar* filename, UInt32* key, uns return false; } -} \ No newline at end of file +} diff --git a/Sources/Plasma/PubUtilLib/plStatusLog/plStatusLog.cpp b/Sources/Plasma/PubUtilLib/plStatusLog/plStatusLog.cpp index eaf41edd..c25fe6e5 100644 --- a/Sources/Plasma/PubUtilLib/plStatusLog/plStatusLog.cpp +++ b/Sources/Plasma/PubUtilLib/plStatusLog/plStatusLog.cpp @@ -472,15 +472,15 @@ bool plStatusLog::IReOpen( void ) ext = L".elf"; #endif wchar fileToOpen[MAX_PATH]; - swprintf(fileToOpen, L"%s.0%s", fileNoExt, ext); + swprintf(fileToOpen, MAX_PATH, L"%s.0%s", fileNoExt, ext); if (!(fFlags & kDontRotateLogs)) { wchar work[MAX_PATH], work2[MAX_PATH]; - swprintf(work, L"%s.3%s",fileNoExt,ext); + swprintf(work, MAX_PATH, L"%s.3%s",fileNoExt,ext); _wremove(work); - swprintf(work2, L"%s.2%s",fileNoExt,ext); + swprintf(work2, MAX_PATH, L"%s.2%s",fileNoExt,ext); _wrename(work2, work); - swprintf(work, L"%s.1%s",fileNoExt,ext); + swprintf(work, MAX_PATH, L"%s.1%s",fileNoExt,ext); _wrename(work, work2); _wrename(fileToOpen, work); } From d05bc8e0c114323e0ebdbd978f31230ce8d3f9bb Mon Sep 17 00:00:00 2001 From: Zrax Date: Thu, 7 Apr 2011 15:10:02 -0700 Subject: [PATCH 7/8] Fix for a guaranteed infinite recursive call bug (cherry picked from commit 749ee03661900a1c44da17969abab08da25e4c56) --- Sources/Plasma/PubUtilLib/plSurface/plLayerMultiply.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/Plasma/PubUtilLib/plSurface/plLayerMultiply.cpp b/Sources/Plasma/PubUtilLib/plSurface/plLayerMultiply.cpp index bf903d59..3a6652d1 100644 --- a/Sources/Plasma/PubUtilLib/plSurface/plLayerMultiply.cpp +++ b/Sources/Plasma/PubUtilLib/plSurface/plLayerMultiply.cpp @@ -150,7 +150,7 @@ UInt32 plLayerMultiply::Eval(double wSecs, UInt32 frame, UInt32 ignore) hsBool plLayerMultiply::MsgReceive(plMessage* msg) { - return plLayerMultiply::MsgReceive(msg); + return plLayerInterface::MsgReceive(msg); } void plLayerMultiply::SetPreshadeColor(const hsColorRGBA& col) From bd74de2226a6c37fce318d9de8e6e40e1ce9e20a Mon Sep 17 00:00:00 2001 From: Zrax Date: Thu, 7 Apr 2011 15:37:34 -0700 Subject: [PATCH 8/8] Missed one of these (cherry picked from commit 7b48da6cb21a1b26ebea2134cdf889a258a8c39f) --- Sources/Plasma/PubUtilLib/plStatGather/plProfileManagerFull.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/Plasma/PubUtilLib/plStatGather/plProfileManagerFull.cpp b/Sources/Plasma/PubUtilLib/plStatGather/plProfileManagerFull.cpp index d592c588..f2f26392 100644 --- a/Sources/Plasma/PubUtilLib/plStatGather/plProfileManagerFull.cpp +++ b/Sources/Plasma/PubUtilLib/plStatGather/plProfileManagerFull.cpp @@ -460,7 +460,7 @@ const wchar* plProfileManagerFull::GetProfilePath() void plProfileManagerFull::ILogStats() { wchar statFilename[256]; - swprintf(statFilename, L"%s%s.csv", GetProfilePath(), fLogAgeName.c_str()); + swprintf(statFilename, 256, L"%s%s.csv", GetProfilePath(), fLogAgeName.c_str()); bool exists = plFileUtils::FileExists(statFilename);