diff --git a/Code/CryEngine/CryCommon/CryCustomTypes.h b/Code/CryEngine/CryCommon/CryCustomTypes.h index 25578ce9cc..8d896f0bf3 100644 --- a/Code/CryEngine/CryCommon/CryCustomTypes.h +++ b/Code/CryEngine/CryCommon/CryCustomTypes.h @@ -282,11 +282,9 @@ struct TIntTraits static const size_t nPOS_BITS = sizeof(T) * 8 - bSIGNED; - static const T nMIN - = bSIGNED ? T (T(1) << (T(sizeof(T) * 8 - 1))) : T(0); + static const T nMIN = std::numeric_limits::min(); - static const T nMAX - = ~nMIN; + static const T nMAX = std::numeric_limits::max(); }; template diff --git a/cmake/Platform/Common/MSVC/Configurations_msvc.cmake b/cmake/Platform/Common/MSVC/Configurations_msvc.cmake index b07a87a35a..3d558129d4 100644 --- a/cmake/Platform/Common/MSVC/Configurations_msvc.cmake +++ b/cmake/Platform/Common/MSVC/Configurations_msvc.cmake @@ -66,7 +66,6 @@ ly_append_configurations_options( /wd4244 # conversion, possible loss of data /wd4245 # conversion, signed/unsigned mismatch /wd4267 # conversion, possible loss of data - /wd4310 # cast truncates constant value /wd4389 # comparison, signed/unsigned mismatch # Enabling warnings that are disabled by default from /W4