Remove an unnecessary null pointer check
An extra null pointer check is not needed in a function like the destructor for the class “QuantEncoding”.
In fact that FAQ is very strange and wrong because it can be NULL only if the allocation of memory happens (or if you somehow managed to assign NULL by hand losing the memory 🤡) but that fails the same moment new fails.
As for what they described, both free() and delete check internally for NULL, of course (in glibc source code that is). That is mandated by the standard. Now, in practice implementions of memory allocators (freeing too) that do not check for NULL do exist.
:crystal_ball: Would you like to add any software build checks (for standard-incompliant C++ delete operators)?
Oh, you are the same guy. https://github.com/uclouvain/openjpeg/issues/589
BTW, here mode == kQuantModeRAW is shot curcuiting. So if it false...