It seems unnecessary to have to use an extra branch to check for this special case.
I couldn't measure any performance difference. Perhaps Clang inlines and removes the check most of the time, but I still think it's worth fixing.
Differential D4945
BumpPtrAllocator: don't accept 0 for the alignment parameter Authored by hans on Aug 17 2014, 12:40 PM.
Details
It seems unnecessary to have to use an extra branch to check for this special case. I couldn't measure any performance difference. Perhaps Clang inlines and removes the check most of the time, but I still think it's worth fixing.
Diff Detail |