From 9a6b3c91b71a6d01f7c07a79e8e2f87b4f00cb4c Mon Sep 17 00:00:00 2001 From: kervala Date: Sat, 10 Dec 2016 18:58:13 +0100 Subject: [PATCH] Changed: Minor changes --HG-- branch : develop --- .../3d/driver/opengl/driver_opengl_window.cpp | 10 ++++----- code/nel/src/misc/common.cpp | 3 ++- code/nel/src/misc/config_file/cf_lexical.cpp | 2 +- code/ryzom/client/src/client.cpp | 3 +-- code/ryzom/client/src/release.cpp | 22 +++++++++---------- 5 files changed, 20 insertions(+), 20 deletions(-) diff --git a/code/nel/src/3d/driver/opengl/driver_opengl_window.cpp b/code/nel/src/3d/driver/opengl/driver_opengl_window.cpp index 171214384..a7eb6e62a 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl_window.cpp +++ b/code/nel/src/3d/driver/opengl/driver_opengl_window.cpp @@ -477,18 +477,18 @@ bool CDriverGL::unInit() // Restore monitor color parameters if (_NeedToRestoreGammaRamp) { - HDC dc = CreateDCA ("DISPLAY", NULL, NULL, NULL); + HDC dc = CreateDCA("DISPLAY", NULL, NULL, NULL); if (dc) { - if (!SetDeviceGammaRamp (dc, _GammaRampBackuped)) - nlwarning ("(CDriverGL::release): SetDeviceGammaRamp failed"); + if (!SetDeviceGammaRamp(dc, _GammaRampBackuped)) + nlwarning("(CDriverGL::release): SetDeviceGammaRamp failed"); // Release the DC - ReleaseDC (NULL, dc); + ReleaseDC(NULL, dc); } else { - nlwarning ("(CDriverGL::release): can't create DC"); + nlwarning("(CDriverGL::release): can't create DC"); } } diff --git a/code/nel/src/misc/common.cpp b/code/nel/src/misc/common.cpp index ee9e84512..2194a89db 100644 --- a/code/nel/src/misc/common.cpp +++ b/code/nel/src/misc/common.cpp @@ -765,7 +765,8 @@ static bool createProcess(const std::string &programName, const std::string &arg args = toString("\"%s\" ", programName.c_str()) + arguments; } - BOOL res = CreateProcessW(sProgramName, utf8ToWide(args), NULL, NULL, FALSE, CREATE_DEFAULT_ERROR_MODE | CREATE_NO_WINDOW, NULL, NULL, &si, &pi); + // or 0 for a window + BOOL res = CreateProcessW(sProgramName, utf8ToWide(args), NULL, NULL, FALSE, CREATE_DEFAULT_ERROR_MODE | CREATE_NO_WINDOW, NULL, NULL /* current dir */, &si, &pi); if (sProgramName) { diff --git a/code/nel/src/misc/config_file/cf_lexical.cpp b/code/nel/src/misc/config_file/cf_lexical.cpp index d132f4df8..fd43a03ce 100644 --- a/code/nel/src/misc/config_file/cf_lexical.cpp +++ b/code/nel/src/misc/config_file/cf_lexical.cpp @@ -3221,7 +3221,7 @@ static void *yy_flex_alloc( size ) yy_size_t size; #endif { - return (void *) malloc( size ); // TODO: delete + return (void *) malloc( size ); } #ifdef YY_USE_PROTOS diff --git a/code/ryzom/client/src/client.cpp b/code/ryzom/client/src/client.cpp index 10a3e1b40..a487bf8dd 100644 --- a/code/ryzom/client/src/client.cpp +++ b/code/ryzom/client/src/client.cpp @@ -183,14 +183,13 @@ int main(int argc, char **argv) Args.addArg("", "release", "", "Crash client after init"); #endif // TEST_CRASH_COUNTER + // extract the 2 or 3 first param (argv[1], argv[2] and argv[3]) it must be [shardId] #ifdef NL_OS_WINDOWS if (!Args.parse(cmdline)) return 1; #else if (!Args.parse(argc, argv)) return 1; #endif - // extract the 2 or 3 first param (argv[1], argv[2] and argv[3]) it must be [shardId] - // no shard id in ring mode std::string sLoginShardId; diff --git a/code/ryzom/client/src/release.cpp b/code/ryzom/client/src/release.cpp index aac29d590..6ad8396e2 100644 --- a/code/ryzom/client/src/release.cpp +++ b/code/ryzom/client/src/release.cpp @@ -569,13 +569,13 @@ void release() releaseCommands(); // Exit config file stuff - ClientCfg.release (); + ClientCfg.release(); // Disconnect the client from the server. NetMngr.disconnect(); // delete the sound manager - if(SoundMngr) + if (SoundMngr) { delete SoundMngr; SoundMngr = NULL; @@ -583,16 +583,16 @@ void release() // Release the Entities Animation Manager CEntityAnimationManager::delInstance(); - EAM= NULL; + EAM = NULL; nldebug("VR [C]: VR Shutting down"); releaseStereoDisplayDevice(); // Delete the driver. - if(Driver) + if (Driver) { // Release the prim - PrimFiles.release (*Driver); + PrimFiles.release(*Driver); if (TextContext != NULL) Driver->deleteTextContext(TextContext); @@ -617,13 +617,13 @@ void release() EventsListener.removeFromServer(CInputHandlerManager::getInstance()->FilteredEventServer); IDisplayer *clientLogDisplayer = ErrorLog->getDisplayer("CLIENT.LOG"); - if( clientLogDisplayer ) + if (clientLogDisplayer) { - DebugLog->removeDisplayer (clientLogDisplayer); - InfoLog->removeDisplayer (clientLogDisplayer); - WarningLog->removeDisplayer (clientLogDisplayer); - ErrorLog->removeDisplayer (clientLogDisplayer); - AssertLog->removeDisplayer (clientLogDisplayer); + DebugLog->removeDisplayer(clientLogDisplayer); + InfoLog->removeDisplayer(clientLogDisplayer); + WarningLog->removeDisplayer(clientLogDisplayer); + ErrorLog->removeDisplayer(clientLogDisplayer); + AssertLog->removeDisplayer(clientLogDisplayer); delete clientLogDisplayer; }