Style: Remove redundant DEBUG_METHODS_ENABLED macro#106456
Conversation
• Replaced with functionally identical and far more ubiquitous `DEBUG_ENABLED`
|
Getting rid of a duplicate macro makes sense, but what was |
|
I'm not certain what niche it filled. It's existed since the engine became open-source, and its instantiation was exactly the same. The only difference is it was in |
|
Okay, so it's possibly just a remnant of pre open source godot. Makes sense to remove it if it doesn't have a niché. |
|
Well one reason to potential keep this, is that it bears a different meaning to By removing this distinction, we're losing some intentionality there in what code gets flagged with That being said, we haven't done that in 10 years, and worst case we can always revert this PR if it was wanted in the future. I'm also not sure that new contributors after Juan have understood the distinction between |
|
If it were to be kept, we would need a dedicated sweep across the repo of what methods/variables should be using the "correct" macro. That feels like more trouble than it's worth, especially if we don't currently have a need for debug methods outside of debug builds |
The macro
DEBUG_METHODS_ENABLEDis entirely redundant, serving no niche that isn't already fulfilled by the more ubiquitous and always-availableDEBUG_ENABLED. This PR removes the former completely, because there's no risk of breaking backwards compatibility; A 1-to-1 replacement already exists withDEBUG_ENABLED, so anything usingDEBUG_METHODS_ENABLEDcould just useDEBUG_ENABLEDinstead. Also adds// DEBUG_ENABLEDto all#endifstatements in the files that needed to be changed, because this is already a style pass so why not