Skip to content

for performance reason the preProcessor of SQF should be used for debuging #1

@X39

Description

@X39

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:

  • Higher performance

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions