diff --git a/src/Client/DefScript/DefScriptFileFunctions.cpp b/src/Client/DefScript/DefScriptFileFunctions.cpp index c16f616..aa3d172 100644 --- a/src/Client/DefScript/DefScriptFileFunctions.cpp +++ b/src/Client/DefScript/DefScriptFileFunctions.cpp @@ -17,7 +17,7 @@ DefReturnResult DefScriptPackage::func_fopen(CmdSet& Set) if(fh->is_open()) return ""; std::string mode = stringToLower(Set.arg[1]); - std::ios::openmode m = 0; + std::ios::openmode m = (std::ios::openmode)(0); if(mode.find('b') != std::string::npos) m |= std::ios_base::binary; if(mode.find('a') != std::string::npos) diff --git a/src/Client/GUI/SceneWorld.cpp b/src/Client/GUI/SceneWorld.cpp index 7ff78fb..4b5bbce 100644 --- a/src/Client/GUI/SceneWorld.cpp +++ b/src/Client/GUI/SceneWorld.cpp @@ -297,8 +297,8 @@ void SceneWorld::UpdateTerrain(void) for(s32 i=0; igetSize().Width+1; i++) { curheight = terrain->getHeight(i,j); - highest = max(highest,curheight); - lowest = min(lowest,curheight); + highest = MAX(highest,curheight); + lowest = MIN(lowest,curheight); } // f32 heightdiff = highest - lowest; diff --git a/src/shared/SysDefs.h b/src/shared/SysDefs.h index 2161cee..505ac75 100644 --- a/src/shared/SysDefs.h +++ b/src/shared/SysDefs.h @@ -87,13 +87,8 @@ #define SIGQUIT 3 #endif -#ifndef min -#define min(a, b) ((a < b) ? a : b) -#endif - -#ifndef max -#define max(a, b) ((a > b) ? a : b) -#endif +#define MIN(a, b) (((a) < (b)) ? (a) : (b)) +#define MAX(a, b) (((a) > (b)) ? (a) : (b)) #if COMPILER == COMPILER_MICROSOFT # if _MSC_VER >= 1500