1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-09-01 02:07:57 +00:00

Eliminate some use of CAP_FOO and ISFOO outside of the preprocessor.

The old code worked, but it's strange to use these macros as if
they were C++ `bool` variables at runtime.
This commit is contained in:
Arthur O'Dwyer
2020-05-03 20:57:34 -04:00
parent f2b7746c1b
commit 3e3457bd81
4 changed files with 48 additions and 45 deletions

View File

@@ -285,7 +285,7 @@ EX void show_memory_menu() {
}
EX bool protect_memory() {
if(!CAP_MEMORY_RESERVE) return false;
#if CAP_MEMORY_RESERVE
apply_memory_reserve();
if(reserve_limit && reserve_count < reserve_limit && !ignored_memory_warning) {
pushScreen(show_memory_menu);
@@ -295,6 +295,7 @@ EX bool protect_memory() {
pushScreen(show_memory_menu);
return true;
}
#endif
return false;
}