What is the purpose of `qt_noop`

I just found the existence of qt_noop() define in qglobal.h as:

 inline void qt_noop() {} 

What is its meaning?

+6
c ++ qt noop
source share
1 answer

I know that it is used internally in some macros that should only do something for debugging collections, for example:

 # 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 
+8
source share

All Articles