make integer literals static const instead of constexpr

This commit is contained in:
Dennis Luxen 2014-06-27 10:22:10 +02:00
parent 7e3f476407
commit eda8f4ccec
2 changed files with 4 additions and 5 deletions

View File

@ -149,7 +149,6 @@ elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
add_definitions(-DNOMINMAX) # avoid min and max macros that can break compilation
add_definitions(-D_USE_MATH_DEFINES) # define M_PI
add_definitions(-D_WIN32_WINNT=0x0501)
set_target_properties(OSRM PROPERTIES STATIC_LIBRARY_FLAGS "/machine:x64")
endif()
# disable partitioning of LTO process when possible (fixes Debian issues)

View File

@ -42,9 +42,9 @@ typedef unsigned int NodeID;
typedef unsigned int EdgeID;
typedef int EdgeWeight;
constexpr NodeID SPECIAL_NODEID = std::numeric_limits<unsigned>::max();
constexpr EdgeID SPECIAL_EDGEID = std::numeric_limits<unsigned>::max();
constexpr unsigned INVALID_NAMEID = std::numeric_limits<unsigned>::max();
constexpr EdgeWeight INVALID_EDGE_WEIGHT = std::numeric_limits<int>::max();
static const NodeID SPECIAL_NODEID = std::numeric_limits<unsigned>::max();
static const EdgeID SPECIAL_EDGEID = std::numeric_limits<unsigned>::max();
static const unsigned INVALID_NAMEID = std::numeric_limits<unsigned>::max();
static const EdgeWeight INVALID_EDGE_WEIGHT = std::numeric_limits<int>::max();
#endif /* TYPEDEFS_H */