Merge pull request #12610 from jaredjones/master
Core/Misc: Silenced 500 OS X Warnings and removed deprecated finite() me...
This commit is contained in:
@@ -15,4 +15,5 @@ if(WITH_COREDEBUG)
|
||||
endif()
|
||||
|
||||
# -Wno-narrowing needed to suppress a warning in g3d
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wno-narrowing")
|
||||
# -Wno-deprecated-register is needed to suppress 185 gsoap warnings on Unix systems.
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wno-narrowing -Wno-deprecated-register")
|
||||
|
||||
@@ -213,7 +213,7 @@ namespace Trinity
|
||||
|
||||
inline bool IsValidMapCoord(float c)
|
||||
{
|
||||
return finite(c) && (std::fabs(c) <= MAP_HALFSIZE - 0.5f);
|
||||
return std::isfinite(c) && (std::fabs(c) <= MAP_HALFSIZE - 0.5f);
|
||||
}
|
||||
|
||||
inline bool IsValidMapCoord(float x, float y)
|
||||
@@ -223,12 +223,12 @@ namespace Trinity
|
||||
|
||||
inline bool IsValidMapCoord(float x, float y, float z)
|
||||
{
|
||||
return IsValidMapCoord(x, y) && finite(z);
|
||||
return IsValidMapCoord(x, y) && std::isfinite(z);
|
||||
}
|
||||
|
||||
inline bool IsValidMapCoord(float x, float y, float z, float o)
|
||||
{
|
||||
return IsValidMapCoord(x, y, z) && finite(o);
|
||||
return IsValidMapCoord(x, y, z) && std::isfinite(o);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -111,7 +111,7 @@
|
||||
|
||||
#endif
|
||||
|
||||
inline float finiteAlways(float f) { return finite(f) ? f : 0.0f; }
|
||||
inline float finiteAlways(float f) { return std::isfinite(f) ? f : 0.0f; }
|
||||
|
||||
#define STRINGIZE(a) #a
|
||||
|
||||
|
||||
@@ -28,6 +28,11 @@
|
||||
|
||||
void SetProcessPriority(const std::string logChannel)
|
||||
{
|
||||
// Suppresses Mac OS X Warning since logChannel isn't used.
|
||||
#if PLATFORM_APPLE
|
||||
(void)logChannel;
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32) || defined(__linux__)
|
||||
|
||||
///- Handle affinity for multiple processors and process priority
|
||||
|
||||
@@ -153,7 +153,7 @@ endif()
|
||||
|
||||
add_dependencies(worldserver revision.h)
|
||||
|
||||
if( UNIX AND NOT NOJEM )
|
||||
if( UNIX AND NOT NOJEM AND NOT APPLE )
|
||||
set(worldserver_LINK_FLAGS "-pthread -lncurses ${worldserver_LINK_FLAGS}")
|
||||
endif()
|
||||
|
||||
|
||||
@@ -535,6 +535,9 @@ void ClearOnlineAccounts()
|
||||
|
||||
variables_map GetConsoleArguments(int argc, char** argv, std::string& configFile, std::string& configService)
|
||||
{
|
||||
// Silences warning about configService not be used if the OS is not Windows
|
||||
(void)configService;
|
||||
|
||||
options_description all("Allowed options");
|
||||
all.add_options()
|
||||
("help,h", "print usage message")
|
||||
|
||||
Reference in New Issue
Block a user