From 320494c83dc48854b1baa50de556498aa2446d12 Mon Sep 17 00:00:00 2001 From: KimLS Date: Thu, 23 May 2013 00:55:29 -0700 Subject: [PATCH] Windows compile fix --- CMakeLists.txt | 11 ++--------- common/ProcLauncher.cpp | 4 ++-- loginserver/Encryption.cpp | 2 +- 3 files changed, 5 insertions(+), 12 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c47168357..41300f4d7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -79,6 +79,8 @@ IF(MSVC) STRING(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}") ENDIF(${flag_var} MATCHES "/MD") ENDFOREACH(flag_var) + + ADD_DEFINITIONS(-DNOMINMAX) ELSE(MSVC) #Normally set by perl but we don't use the perl flags anymore so we set it. ADD_DEFINITIONS(-DHAS_UNION_SEMUN) @@ -125,17 +127,8 @@ OPTION(EQEMU_BUILD_PERL "Build Perl parser." ON) #C++11 stuff IF(NOT MSVC) ADD_DEFINITIONS(-std=c++0x) - #Rvalue-Move - todo: auto set this based on gcc version - OPTION(EQEMU_ENABLE_RVALUE_MOVE "Enable EQEmu RValue References (Enable if GCC 4.3 or higher)" OFF) -ELSE(NOT MSVC) - #Rvalue-Move - todo: auto set this based on msvc version - OPTION(EQEMU_ENABLE_RVALUE_MOVE "Enable EQEmu RValue References (Enable if Visual Studio 2010 or higher)" OFF) ENDIF(NOT MSVC) -IF(EQEMU_ENABLE_RVALUE_MOVE) - ADD_DEFINITIONS(-DEQEMU_RVALUE_MOVE) -ENDIF(EQEMU_ENABLE_RVALUE_MOVE) - #Various definitions IF(EQEMU_BUILD_PERL) ADD_DEFINITIONS(-DEMBPERL) diff --git a/common/ProcLauncher.cpp b/common/ProcLauncher.cpp index d2db2f6d4..b4b95bb91 100644 --- a/common/ProcLauncher.cpp +++ b/common/ProcLauncher.cpp @@ -165,8 +165,8 @@ ProcLauncher::ProcRef ProcLauncher::Launch(Spec *&to_launch) { // Create the child process. //glue together all the nice command line arguments - string args(it->program); - vector::iterator cur, end; + std::string args(it->program); + std::vector::iterator cur, end; cur = it->args.begin(); end = it->args.end(); for(; cur != end; cur++) { diff --git a/loginserver/Encryption.cpp b/loginserver/Encryption.cpp index 129ab18e3..e09b1bf27 100644 --- a/loginserver/Encryption.cpp +++ b/loginserver/Encryption.cpp @@ -21,7 +21,7 @@ extern ErrorLog *server_log; -bool Encryption::LoadCrypto(string name) +bool Encryption::LoadCrypto(std::string name) { if(!Load(name.c_str())) {