mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-09-07 04:47:56 +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:
@@ -5,7 +5,7 @@ namespace dhrg {
|
||||
|
||||
struct progressbar : indenter_finish {
|
||||
string name;
|
||||
static const int PBSIZE = 64;
|
||||
static constexpr int PBSIZE = 64;
|
||||
int step = -1, total, drawat = 0, count = -1;
|
||||
|
||||
void operator ++ (int) {
|
||||
|
@@ -12,10 +12,10 @@ using namespace hr;
|
||||
typedef long long ll;
|
||||
|
||||
#ifndef BOXSIZE
|
||||
static const int BOXSIZE = 32;
|
||||
static constexpr int BOXSIZE = 32;
|
||||
#endif
|
||||
static const int MAXDIST = (2*BOXSIZE);
|
||||
static const int SETS = 4;
|
||||
static constexpr int MAXDIST = (2*BOXSIZE);
|
||||
static constexpr int SETS = 4;
|
||||
|
||||
struct segment;
|
||||
|
||||
|
Reference in New Issue
Block a user