mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-09-10 06:16:00 +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:
@@ -77,7 +77,7 @@ EX int btspin(int id, int d) {
|
||||
|
||||
#if HDR
|
||||
|
||||
static const int ERR = -99;
|
||||
static constexpr int ERR = -99;
|
||||
|
||||
struct triplet_info {
|
||||
int i, j, size;
|
||||
@@ -272,7 +272,7 @@ struct fpattern {
|
||||
|
||||
void build();
|
||||
|
||||
static const int MAXDIST = 120;
|
||||
static constexpr int MAXDIST = 120;
|
||||
|
||||
vector<char> disthep;
|
||||
vector<char> disthex;
|
||||
|
Reference in New Issue
Block a user