GCC 11 says:
Sources/Entities/Camera.es:397:10: warning: the compiler can assume
that the address of ‘cm’ will never be NULL [-Waddress]
The MP version of Camera.es simply checks m_penTarget instead, so
that's what I've done here. It's not clear what the intention of the
original code was.
At least on my system floor() and log10() return double, so the other
arguments to Clamp() and ClampDn() didn't match anymore, now being float
instead of double.
I replaced the calls to log10f() and floorf() to avoid any ambiguities.
Also changed all "if (this==NULL) return;"s.
Fixes some -Wtautological-undefined-compare warnings.
Quoting Clang:
"'this' pointer cannot be null in well-defined C++ code; comparison may
be assumed to always evaluate to false"
The code used to store the world pointer as a console variable
"pwoCurrentWorld" of type INDEX (int32) - that won't work for 64bit, so
I added CShell::SetCurrentWorld() and CShell::GetCurrentWorld() and
store it as a pointer.