Skip to content

Commit 0dada51

Browse files
red-001nerzhul
authored andcommittedJan 20, 2017
Remove mathconstants.h and use the correct way to get M_PI in MSVC. (#5072)
1 parent efa54f9 commit 0dada51

12 files changed

+2
-17
lines changed
 

‎src/CMakeLists.txt

+2
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,8 @@ if(WIN32)
284284
set(PLATFORM_LIBS dbghelp.lib ${PLATFORM_LIBS})
285285
# Surpress some useless warnings
286286
add_definitions ( /D "_CRT_SECURE_NO_DEPRECATE" /W1 )
287+
# Get M_PI to work
288+
add_definitions(/D "_USE_MATH_DEFINES")
287289
else() # Probably MinGW = GCC
288290
set(PLATFORM_LIBS "")
289291
endif()

‎src/camera.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
3131
#include "event.h"
3232
#include "profiler.h"
3333
#include "util/numeric.h"
34-
#include "util/mathconstants.h"
3534
#include "constants.h"
3635
#include "fontengine.h"
3736

‎src/clientiface.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
2121

2222
#include "clientiface.h"
2323
#include "util/numeric.h"
24-
#include "util/mathconstants.h"
2524
#include "remoteplayer.h"
2625
#include "settings.h"
2726
#include "mapblock.h"

‎src/clientmap.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
2929
#include "profiler.h"
3030
#include "settings.h"
3131
#include "camera.h" // CameraModes
32-
#include "util/mathconstants.h"
3332
#include "util/basic_macros.h"
3433
#include <algorithm>
3534

‎src/content_cao.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
2626
#include "content_cao.h"
2727
#include "util/numeric.h" // For IntervalLimiter
2828
#include "util/serialize.h"
29-
#include "util/mathconstants.h"
3029
#include "util/basic_macros.h"
3130
#include "client/tile.h"
3231
#include "environment.h"

‎src/content_sao.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
1818
*/
1919

2020
#include "content_sao.h"
21-
#include "util/mathconstants.h"
2221
#include "util/serialize.h"
2322
#include "collision.h"
2423
#include "environment.h"

‎src/map.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
3232
#include "nodedef.h"
3333
#include "gamedef.h"
3434
#include "util/directiontables.h"
35-
#include "util/mathconstants.h"
3635
#include "util/basic_macros.h"
3736
#include "rollback_interface.h"
3837
#include "environment.h"

‎src/mg_biome.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
2424
#include "nodedef.h"
2525
#include "map.h" //for MMVManip
2626
#include "util/numeric.h"
27-
#include "util/mathconstants.h"
2827
#include "porting.h"
2928
#include "settings.h"
3029

‎src/server.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
5353
#include "event_manager.h"
5454
#include "serverlist.h"
5555
#include "util/string.h"
56-
#include "util/mathconstants.h"
5756
#include "rollback.h"
5857
#include "util/serialize.h"
5958
#include "util/thread.h"

‎src/treegen.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
2121
#include <stack>
2222
#include "util/pointer.h"
2323
#include "util/numeric.h"
24-
#include "util/mathconstants.h"
2524
#include "map.h"
2625
#include "serverenvironment.h"
2726
#include "nodedef.h"

‎src/util/mathconstants.h

-7
This file was deleted.

‎src/util/numeric.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
1818
*/
1919

2020
#include "numeric.h"
21-
#include "mathconstants.h"
2221

2322
#include "log.h"
2423
#include "../constants.h" // BS, MAP_BLOCKSIZE

0 commit comments

Comments
 (0)
Please sign in to comment.