1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-09-11 06:45:59 +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:
Arthur O'Dwyer
2023-08-23 09:44:37 -08:00
parent b70b339f52
commit 62629f3e70
48 changed files with 453 additions and 458 deletions

View File

@@ -54,7 +54,7 @@ namespace rogueviz {
edgetype *add_edgetype(const string& name);
static const unsigned DEFAULT_COLOR = 0x471293B5;
static constexpr unsigned DEFAULT_COLOR = 0x471293B5;
extern edgetype default_edgetype;
@@ -255,7 +255,7 @@ function<void(presmode)> roguevizslide_action(char c, const T& t, const U& act)
void use_angledir(presmode mode, bool reset);
void slide_error(presmode mode, string s);
static const flagtype LATEX_COLOR = 1;
static constexpr flagtype LATEX_COLOR = 1;
void show_latex(presmode mode, string s);
void dialog_add_latex(string s, color_t color, int size = 100, flagtype flag = 0);