DescentDevelopers / Descent3

Descent 3 by Outrage Entertainment
GNU General Public License v3.0
2.73k stars 231 forks source link

Define OutrageMessageBox regardless of DEBUG #461

Closed tophyr closed 1 week ago

tophyr commented 1 week ago

Pull Request Type

Description

OutrageMessageBox() doesn't depend on anything debug-specific - it appears to be conditionally-defined basically just to avoid interrupting the user in release builds. However, the codebase appears to think that DEBUG and RELEASE are perfect opposites, which is not true. (The RelWithDebInfo build, in particular, has neither set.)

Here we define OutrageMessageBox regardless of build type, and let the RELEASE check determine whether or not it wants to interrupt the user.

Checklist

tophyr commented 1 week ago

Better fix that does not require compile-time conditionals: Define OutrageMessageBox functions for non-debug builds with empty function body in error.cpp, and remove all compile guards on function usage

re-worked. i didn't go with the empty body, because the body appears to be there either way already. the RELEASE checks appear to be primarily to avoid string calculations when unnecessary.