Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我刚刚发现qt_noop()qglobal.h 中定义的存在为:
qt_noop()
inline void qt_noop() {}
它有什么意义?
我知道它在一些宏内部使用,这些宏应该只对调试版本做一些事情,例如:
# ifndef QT_NO_DEBUG # define Q_ASSERT(cond) ((!(cond)) ? qt_assert(#cond,__FILE__,__LINE__) : qt_noop()) # else # define Q_ASSERT(cond) qt_noop() # endif #endif