@Violet-Giraffe said:
Isn't any modern C++ compiler capable of doing that optimization implicitly (with optimizations enabled)?
In all probability, yes; it's just a stupid habit. Compilers weren't so smart before, but they are improving by the minute. You can safely replace it with left.height() / 2.