mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-09-11 14:56: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:
4
util.cpp
4
util.cpp
@@ -573,8 +573,8 @@ EX string available_constants() {
|
||||
|
||||
#if HDR
|
||||
struct bignum {
|
||||
static const int BASE = 1000000000;
|
||||
static const long long BASE2 = BASE * (long long)BASE;
|
||||
static constexpr int BASE = 1000000000;
|
||||
static constexpr long long BASE2 = BASE * (long long)BASE;
|
||||
vector<int> digits;
|
||||
bignum() {}
|
||||
bignum(int i) : digits() { digits.push_back(i); }
|
||||
|
Reference in New Issue
Block a user