https://linen.dev logo
Indeed you are correct. checkIndex() is called ONL...
# programming
t
Indeed you are correct. checkIndex() is called ONLY when FULLDEBUG is true. So, it is a good idea to try compiling and running stuff with OpenFOAM built with
WM_COMPILE_OPTION=Debug
. And sometimes run through valgrind, also.
Copy code
template<class T>
inline T& Foam::UList<T>::operator[](const label i)
{
    #ifdef FULLDEBUG
    checkIndex(i);
    #endif
    return v_[i];
}