LuaPreprocess icon indicating copy to clipboard operation
LuaPreprocess copied to clipboard

How can I implement the following functionality?

Open King8611 opened this issue 2 years ago • 1 comments

Hello, I would like to implement a macro definition feature similar to C++. Here is an example code. Could you please guide me on how to achieve this?

#define GIsShipping

#if GIsShipping then
    #define Log(...) Log(...)
#else
    #define Log(...) 
#endif

King8611 avatar Nov 13 '23 11:11 King8611

My goal is to avoid modifying the existing code in the project and prevent memory allocation and garbage collection for the strings passed to Log in the shipping version.

King8611 avatar Nov 13 '23 11:11 King8611