ETEngine
ETEngine copied to clipboard
Remove unnecessary null pointer checks
An extra null pointer check is not needed in functions like the following.
i use this
template <typename TElement>
inline void SafeDelete(TElement*& elementPointer)
{
if (elementPointer)
{
delete elementPointer;
elementPointer = nullptr;
}
}
@codenamecpp: I find that your example for a function template contains an unnecessary null pointer check.