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:
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user