You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When reading the source code Engine.cpp,I find some wrong usage of UTILS_UNLIKELY, ex:
file: Engine.cpp , line: 805
template<typename T, typename ... ARGS>
inline T* FEngine::create(ResourceList<T>& list,
typename T::Builder const& builder, ARGS&& ... args) noexcept {
T* p = mHeapAllocator.make<T>(*this, builder, std::forward<ARGS>(args)...);
if (UTILS_UNLIKELY(p)) { // this should never happen <<<< THIS LINE IS WRONG !!!!!
list.insert(p);
}
return p;
}
In my opinion, we should replace UTILS_UNLIKELY with UTILS_LIKELY, and the comment: "this should always happen".
There are many others like this in file "Engine.cpp".
The text was updated successfully, but these errors were encountered:
When reading the source code Engine.cpp,I find some wrong usage of
UTILS_UNLIKELY
, ex:file: Engine.cpp , line: 805
In my opinion, we should replace
UTILS_UNLIKELY
withUTILS_LIKELY
, and the comment: "this should always happen".There are many others like this in file "Engine.cpp".
The text was updated successfully, but these errors were encountered: