mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-10-11 20:57:41 +00:00
Change static const
to static constexpr
wherever possible
Since we require C++11, most of these consts can be constexpr. Two `static const ld` remain non-compile-time-evaluable because they depend on the runtime `log` function. One `static const cld` remains non-compile-time because `std::complex<T>` doesn't become constexpr until C++14.
This commit is contained in:
@@ -20,7 +20,7 @@ EX namespace mapeditor {
|
||||
|
||||
#if HDR
|
||||
enum eShapegroup { sgPlayer, sgMonster, sgItem, sgFloor, sgWall };
|
||||
static const int USERSHAPEGROUPS = 5;
|
||||
static constexpr int USERSHAPEGROUPS = 5;
|
||||
#endif
|
||||
|
||||
EX color_t dtfill = 0;
|
||||
@@ -1873,7 +1873,7 @@ EX namespace mapeditor {
|
||||
bool coloring;
|
||||
color_t colortouse = 0xC0C0C0FFu;
|
||||
// fake key sent to change the color
|
||||
static const int COLORKEY = (-10000);
|
||||
static constexpr int COLORKEY = (-10000);
|
||||
|
||||
EX shiftmatrix drawtrans, drawtransnew;
|
||||
|
||||
|
Reference in New Issue
Block a user