From cd250f3fec21aecf2e389290366afb41ec9721b1 Mon Sep 17 00:00:00 2001 From: ShinDarth Date: Wed, 17 Aug 2016 10:14:13 +0200 Subject: [PATCH 1/3] Some corrections to previous commits --- modules/acore/deps/mysqllite/include/my_global.h | 7 +++++-- .../MovementGenerators/RandomMovementGenerator.cpp | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/modules/acore/deps/mysqllite/include/my_global.h b/modules/acore/deps/mysqllite/include/my_global.h index 3bd3f219c..dd0a18f7a 100644 --- a/modules/acore/deps/mysqllite/include/my_global.h +++ b/modules/acore/deps/mysqllite/include/my_global.h @@ -786,9 +786,12 @@ inline unsigned long long my_double2ulonglong(double d) #define SIZE_T_MAX (~((size_t) 0)) #endif -#ifndef isfinite +#ifdef HAVE_FINITE +#define isfinite(x) finite(x) +#else +#define finite(x) (1.0 / fabs(x) > 0.0) +#endif /* HAVE_FINITE */ #define isfinite(x) (1.0 / fabs(x) > 0.0) -#endif /* isfinite */ #ifndef HAVE_ISNAN #define isnan(x) ((x) != (x)) diff --git a/src/game/Movement/MovementGenerators/RandomMovementGenerator.cpp b/src/game/Movement/MovementGenerators/RandomMovementGenerator.cpp index c7f0e101c..851739298 100644 --- a/src/game/Movement/MovementGenerators/RandomMovementGenerator.cpp +++ b/src/game/Movement/MovementGenerators/RandomMovementGenerator.cpp @@ -138,7 +138,7 @@ void RandomMovementGenerator::_setRandomLocation(Creature* creature) // Xinef: tree climbing, cut as much as we can if (zDiff > 2.0f || - (G3D::fuzzyNe(zDiff, 0.0f) && distDiff / zDiff < 2.15f)) // ~25� + (G3D::fuzzyNe(zDiff, 0.0f) && distDiff / zDiff < 2.15f)) // ~25˚ { _validPointsVector[_currentPoint].erase(randomIter); _preComputedPaths.erase(pathIdx); From 0c554291b51521359b7ca3e7f0ffe615fc9083ff Mon Sep 17 00:00:00 2001 From: ShinDarth Date: Wed, 17 Aug 2016 10:14:42 +0200 Subject: [PATCH 2/3] Build/Clang: suppress useless warnings --- modules/acore/cmake/compiler/clang/settings.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/acore/cmake/compiler/clang/settings.cmake b/modules/acore/cmake/compiler/clang/settings.cmake index 4dad4cb78..e18e45745 100644 --- a/modules/acore/cmake/compiler/clang/settings.cmake +++ b/modules/acore/cmake/compiler/clang/settings.cmake @@ -15,6 +15,6 @@ if(WITH_COREDEBUG) endif() # -Wno-narrowing needed to suppress a warning in g3d -# -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") +# -Wno-deprecated-register -Wstring-plus-int -Wpointer-bool-conversion are needed to suppress gsoap warnings on Unix systems. +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wno-narrowing -Wno-deprecated-register -Wstring-plus-int -Wpointer-bool-conversion -Wparentheses") set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG=1") From 5fe8821567c45087ec0e018322374aca90e8ba5d Mon Sep 17 00:00:00 2001 From: ShinDarth Date: Wed, 17 Aug 2016 10:15:09 +0200 Subject: [PATCH 3/3] Build/Clang: fixed 2 warnings --- .../Movement/MovementGenerators/WaypointMovementGenerator.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp b/src/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp index 1ec5722f5..6b2899e26 100644 --- a/src/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp +++ b/src/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp @@ -374,14 +374,14 @@ bool FlightPathMovementGenerator::DoUpdate(Player* player, uint32 /*diff*/) { if (i_currentNode >= i_path.size()) { - sLog->outMisc("TAXI NODE WAS GREATER THAN PATH SIZE, GUID: %u, POINTID: %u, NODESIZE: %u, CURRENT: %u", player->GetGUIDLow(), pointId, i_path.size(), i_currentNode); + sLog->outMisc("TAXI NODE WAS GREATER THAN PATH SIZE, GUID: %u, POINTID: %u, NODESIZE: %lu, CURRENT: %u", player->GetGUIDLow(), pointId, i_path.size(), i_currentNode); player->CleanupAfterTaxiFlight(); return false; } if (i_path[i_currentNode]->mapid != player->GetMapId()) { - sLog->outMisc("Player on different map, curmap: %u, pointmap: %u, nodesize: %u, currentnode: %u", player->GetMapId(), i_path[i_currentNode]->mapid, i_path.size(), i_currentNode); + sLog->outMisc("Player on different map, curmap: %u, pointmap: %u, nodesize: %lu, currentnode: %u", player->GetMapId(), i_path[i_currentNode]->mapid, i_path.size(), i_currentNode); player->CleanupAfterTaxiFlight(); return false; }