mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-10-18 07:27:40 +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:
@@ -25,7 +25,7 @@ EX unsigned char& part(color_t& col, int i) {
|
||||
}
|
||||
|
||||
#if HDR
|
||||
static const color_t NOCOLOR = 0;
|
||||
static constexpr color_t NOCOLOR = 0;
|
||||
|
||||
struct colortable: vector<color_t> {
|
||||
color_t& operator [] (int i) { i %= size(); if(i<0) i += size(); return ((vector<color_t>&)(*this)) [i]; }
|
||||
|
Reference in New Issue
Block a user