Skip to main content
Code Review

Return to Answer

replaced http://codereview.stackexchange.com/ with https://codereview.stackexchange.com/
Source Link

Sounds great. I would recommend a little improvement to Loki Astari's answer Loki Astari's answer.

By changing the way you define LOG_ENTRY_EXIT,

#if defined(DEBUG)
#define LOG_ENTRY_EXIT LOG_ENTRY_EXIT_FOR(__func__)
#else
#define LOG_ENTRY_EXIT
#endif

One will be able to compile it in or out for say release build if needed.

We use this type of tracing quite a lot in game development code.

Sounds great. I would recommend a little improvement to Loki Astari's answer.

By changing the way you define LOG_ENTRY_EXIT,

#if defined(DEBUG)
#define LOG_ENTRY_EXIT LOG_ENTRY_EXIT_FOR(__func__)
#else
#define LOG_ENTRY_EXIT
#endif

One will be able to compile it in or out for say release build if needed.

We use this type of tracing quite a lot in game development code.

Sounds great. I would recommend a little improvement to Loki Astari's answer.

By changing the way you define LOG_ENTRY_EXIT,

#if defined(DEBUG)
#define LOG_ENTRY_EXIT LOG_ENTRY_EXIT_FOR(__func__)
#else
#define LOG_ENTRY_EXIT
#endif

One will be able to compile it in or out for say release build if needed.

We use this type of tracing quite a lot in game development code.

cleaned up your answer for you - this is what I meant with "referencing another answer".
Source Link
Pimgd
  • 22.5k
  • 5
  • 68
  • 144

Sounds great. I would makerecommend a little improvement to last code like this similar to this:Loki Astari's answer .

By changing the way you define LOG_ENTRY_EXIT,

#if defined(DEBUG)
#define LOG_ENTRY_EXIT LOG_ENTRY_EXIT_FOR(__func__)
#else
#define LOG_ENTRY_EXIT
#endif

This way oneOne will be able to compile it in or out for say release build if needed. BTW,

We use this type of tracing quite a lot in game development code.

Sounds great. I would make a little improvement to last code like this similar to this:

#if defined(DEBUG)
#define LOG_ENTRY_EXIT LOG_ENTRY_EXIT_FOR(__func__)
#else
#define LOG_ENTRY_EXIT
#endif

This way one will be able to compile it in or out for say release build if needed. BTW, We use this type of tracing quite a lot in game development code.

Sounds great. I would recommend a little improvement to Loki Astari's answer .

By changing the way you define LOG_ENTRY_EXIT,

#if defined(DEBUG)
#define LOG_ENTRY_EXIT LOG_ENTRY_EXIT_FOR(__func__)
#else
#define LOG_ENTRY_EXIT
#endif

One will be able to compile it in or out for say release build if needed.

We use this type of tracing quite a lot in game development code.

Source Link

Sounds great. I would make a little improvement to last code like this similar to this:

#if defined(DEBUG)
#define LOG_ENTRY_EXIT LOG_ENTRY_EXIT_FOR(__func__)
#else
#define LOG_ENTRY_EXIT
#endif

This way one will be able to compile it in or out for say release build if needed. BTW, We use this type of tracing quite a lot in game development code.

lang-cpp

AltStyle によって変換されたページ (->オリジナル) /