The current implementation would benefit from a preProcessor debuging instead of runtime debuging
To do something like that you need to implement some sort of DEBUG defines
for example:
#define DEBUG
#ifndef DEBUG
#define DEBUG_LOG(X)
#define DEBUG_CODE(X)
#define COMMA
#else
#define DEBUG_LOG(X) diag_log (X);
#define DEBUG_CODE(X) X;
#define COMMA ,
#endif
Pros:
Cons:
- For debuging you need to recompile the functions
- code will be harder to read as you need to use the COMMA definition for Arrays etc. instead of the easy char
The current implementation would benefit from a preProcessor debuging instead of runtime debuging
To do something like that you need to implement some sort of DEBUG defines
for example:
Pros:
Cons: