mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2026-10-29 03:54:30 +00:00
circumvent an apparent compiler bug with hlog
This commit is contained in:
1 parent
58a09d263d
commit
83336ec0fe
1 file changed
+8
-3
+8
-3
@@ -263,7 +263,9 @@ struct logger : hstream {
|
||||
void flush() override { fflush(stdout); }
|
||||
};
|
||||
|
||||
extern logger hlog;
|
||||
extern logger *hlog_ptr;
|
||||
#define hlog (*hlog_ptr)
|
||||
|
||||
template<class... T> void println_log(T... t) { println(hlog, t...); }
|
||||
template<class... T> void print_log(T... t) { print(hlog, t...); }
|
||||
|
||||
@@ -406,8 +408,6 @@ EX string itsh(unsigned long long i) {
|
||||
else return itsh(i0);
|
||||
}
|
||||
|
||||
EX logger hlog;
|
||||
|
||||
// kz: utility for printing
|
||||
// if it is close to 0, assume it is floating errors
|
||||
|
||||
@@ -604,6 +604,11 @@ struct progressbar {
|
||||
|
||||
progressbar(int t, string n) : name(n) { total = t; (*this)++; tstart = SDL_GetTicks(); }
|
||||
};
|
||||
|
||||
logger actual_hlog;
|
||||
|
||||
logger *hlog_ptr = &actual_hlog;
|
||||
|
||||
#endif
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user