1

I am unable to identify a compiler flag that would turn off all of the seemingly pointless (with production code) calls that are presumably mainly for tracing.

--no-traces

does not accomplish this.

Calls like:

HX_STACK_LINE
HX_STACK_PUSH

Perhaps these should be able to be turned off and the APIs that rely on them disabled if necessary for production code.

4

1 回答 1

2

我一开始也担心这个。然而,事实证明,只要您不定义某些变量,所有这些插入的行都会在编译 C++ 代码时被删除。

(供参考,变量为HXCPP_DEBUGGERHXCPP_DEBUGHXCPP_STACK_VARSHXCPP_STACK_LINE、 和HXCPP_STACK_TRACE,默认情况下均未定义)

于 2013-07-19T00:14:41.800 回答