mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-09-04 19:47:54 +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:
@@ -9,7 +9,7 @@
|
||||
namespace hr {
|
||||
|
||||
#if HDR
|
||||
static const int PSEUDOKEY_MEMORY = 16397;
|
||||
static constexpr int PSEUDOKEY_MEMORY = 16397;
|
||||
#endif
|
||||
|
||||
EX bool memory_saving_mode = true;
|
||||
@@ -17,7 +17,7 @@ EX bool memory_saving_mode = true;
|
||||
EX bool show_memory_warning = true;
|
||||
EX bool ignored_memory_warning;
|
||||
|
||||
static const int LIM = 150;
|
||||
static constexpr int LIM = 150;
|
||||
|
||||
EX heptagon *last_cleared;
|
||||
|
||||
|
Reference in New Issue
Block a user