3 ms·
Why don't you use macros? Additionally, source control tools make deleting code much more convenient, no?
by shin_lao 14y ago
Why don't you use macros?
Additionally, source control tools make deleting code much more convenient, no?
- delinka 14y agoDuring debugging, there's often the need to temporarily disable a few lines of code to see the effect it has. I'm certainly not going back-and-forth with source control for something so trivial. That said, macros do make sense in this case- you can #define a single flag (e.g. FLAG) as a 0 or 1 and simply #if FLAG ... #endif, but it's certainly more typing to set up.
- shin_lao 14y agoIn that case I think I would prefer to use my editor's keyboard shortcut to comment out code, but that's a personal choice.