Fix GCC -Waddress warning in PlayCamera

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.
This commit is contained in:
James Le Cuirot 2021-11-15 22:24:00 +00:00
parent 8f1a2733d8
commit ad5655e60c
No known key found for this signature in database
GPG Key ID: 1226415D00DD3137

View File

@ -391,10 +391,8 @@ procedures:
// determine camera type and jump to corresponding routine // determine camera type and jump to corresponding routine
PlayCamera() PlayCamera()
{ {
// eventually add to movers list
CCameraMarker &cm = (CCameraMarker&)*m_penTarget;
// if we have at least one marker // if we have at least one marker
if( &cm!=NULL) { if( m_penTarget!=NULL) {
// treat camera as movable // treat camera as movable
jump PlayMovingCamera(); jump PlayMovingCamera();
// if there isn't any markers // if there isn't any markers