Skip to content

Commit

Permalink
Remove mathconstants.h and use the correct way to get M_PI in MSV…
Browse files Browse the repository at this point in the history
…C. (#5072)
  • Loading branch information
red-001 authored and nerzhul committed Jan 20, 2017
1 parent efa54f9 commit 0dada51
Show file tree
Hide file tree
Showing 12 changed files with 2 additions and 17 deletions.
2 changes: 2 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,8 @@ if(WIN32)
set(PLATFORM_LIBS dbghelp.lib ${PLATFORM_LIBS})
# Surpress some useless warnings
add_definitions ( /D "_CRT_SECURE_NO_DEPRECATE" /W1 )
# Get M_PI to work
add_definitions(/D "_USE_MATH_DEFINES")
else() # Probably MinGW = GCC
set(PLATFORM_LIBS "")
endif()
Expand Down
1 change: 0 additions & 1 deletion src/camera.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "event.h"
#include "profiler.h"
#include "util/numeric.h"
#include "util/mathconstants.h"
#include "constants.h"
#include "fontengine.h"

Expand Down
1 change: 0 additions & 1 deletion src/clientiface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,

#include "clientiface.h"
#include "util/numeric.h"
#include "util/mathconstants.h"
#include "remoteplayer.h"
#include "settings.h"
#include "mapblock.h"
Expand Down
1 change: 0 additions & 1 deletion src/clientmap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "profiler.h"
#include "settings.h"
#include "camera.h" // CameraModes
#include "util/mathconstants.h"
#include "util/basic_macros.h"
#include <algorithm>

Expand Down
1 change: 0 additions & 1 deletion src/content_cao.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "content_cao.h"
#include "util/numeric.h" // For IntervalLimiter
#include "util/serialize.h"
#include "util/mathconstants.h"
#include "util/basic_macros.h"
#include "client/tile.h"
#include "environment.h"
Expand Down
1 change: 0 additions & 1 deletion src/content_sao.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
*/

#include "content_sao.h"
#include "util/mathconstants.h"
#include "util/serialize.h"
#include "collision.h"
#include "environment.h"
Expand Down
1 change: 0 additions & 1 deletion src/map.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "nodedef.h"
#include "gamedef.h"
#include "util/directiontables.h"
#include "util/mathconstants.h"
#include "util/basic_macros.h"
#include "rollback_interface.h"
#include "environment.h"
Expand Down
1 change: 0 additions & 1 deletion src/mg_biome.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "nodedef.h"
#include "map.h" //for MMVManip
#include "util/numeric.h"
#include "util/mathconstants.h"
#include "porting.h"
#include "settings.h"

Expand Down
1 change: 0 additions & 1 deletion src/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "event_manager.h"
#include "serverlist.h"
#include "util/string.h"
#include "util/mathconstants.h"
#include "rollback.h"
#include "util/serialize.h"
#include "util/thread.h"
Expand Down
1 change: 0 additions & 1 deletion src/treegen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include <stack>
#include "util/pointer.h"
#include "util/numeric.h"
#include "util/mathconstants.h"
#include "map.h"
#include "serverenvironment.h"
#include "nodedef.h"
Expand Down
7 changes: 0 additions & 7 deletions src/util/mathconstants.h

This file was deleted.

1 change: 0 additions & 1 deletion src/util/numeric.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
*/

#include "numeric.h"
#include "mathconstants.h"

#include "log.h"
#include "../constants.h" // BS, MAP_BLOCKSIZE
Expand Down

0 comments on commit 0dada51

Please sign in to comment.