[Scummvm-git-logs] scummvm master -> 50d70afe722b70837324f104e51d05c36928363e

digitall noreply at scummvm.org
Wed Aug 10 00:53:36 UTC 2022


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
50d70afe72 DIRECTOR: Fix GCC Compiler Warnings


Commit: 50d70afe722b70837324f104e51d05c36928363e
    https://github.com/scummvm/scummvm/commit/50d70afe722b70837324f104e51d05c36928363e
Author: D G Turner (digitall at scummvm.org)
Date: 2022-08-10T01:52:58+01:00

Commit Message:
DIRECTOR: Fix GCC Compiler Warnings

Changed paths:
    engines/director/cast.cpp
    engines/director/movie.cpp


diff --git a/engines/director/cast.cpp b/engines/director/cast.cpp
index 9f80f59e848..353c653c31c 100644
--- a/engines/director/cast.cpp
+++ b/engines/director/cast.cpp
@@ -491,25 +491,25 @@ void Cast::loadCast() {
 	}
 
 	// Font Mapping
-	if (r = _castArchive->getMovieResourceIfPresent(MKTAG('V', 'W', 'F', 'M'))) {
+	if ((r = _castArchive->getMovieResourceIfPresent(MKTAG('V', 'W', 'F', 'M'))) != nullptr) {
 		loadFontMap(*r);
 		delete r;
 	}
 
 	// Cross-Platform Font Mapping
-	if (r = _castArchive->getMovieResourceIfPresent(MKTAG('F', 'X', 'm', 'p'))) {
+	if ((r = _castArchive->getMovieResourceIfPresent(MKTAG('F', 'X', 'm', 'p'))) != nullptr) {
 		loadFXmp(*r);
 		delete r;
 	}
 
 	// Font Mapping V4
-	if (r = _castArchive->getMovieResourceIfPresent(MKTAG('F', 'm', 'a', 'p'))) {
+	if ((r = _castArchive->getMovieResourceIfPresent(MKTAG('F', 'm', 'a', 'p'))) != nullptr) {
 		loadFontMapV4(*r);
 		delete r;
 	}
 
 	// Pattern Tiles
-	if (r = _castArchive->getMovieResourceIfPresent(MKTAG('V', 'W', 'T', 'L'))) {
+	if ((r = _castArchive->getMovieResourceIfPresent(MKTAG('V', 'W', 'T', 'L'))) != nullptr) {
 		loadVWTL(*r);
 		delete r;
 	}
@@ -527,7 +527,7 @@ void Cast::loadCast() {
 	}
 
 	// External sound files
-	if (r = _castArchive->getMovieResourceIfPresent(MKTAG('S', 'T', 'R', ' '))) {
+	if ((r = _castArchive->getMovieResourceIfPresent(MKTAG('S', 'T', 'R', ' '))) != nullptr) {
 		loadExternalSound(*r);
 		delete r;
 	}
@@ -560,7 +560,7 @@ void Cast::loadCast() {
 	// For D4+ we may request to force Lingo scripts and skip precompiled bytecode
 	if (_version >= kFileVer400 && !debugChannelSet(-1, kDebugNoBytecode)) {
 		// Try to load script context
-		if (r = _castArchive->getMovieResourceIfPresent(MKTAG('L', 'c', 't', 'x'))) {
+		if ((r = _castArchive->getMovieResourceIfPresent(MKTAG('L', 'c', 't', 'x'))) != nullptr) {
 			loadLingoContext(*r);
 			delete r;
 		}
@@ -577,7 +577,7 @@ void Cast::loadCast() {
 	}
 
 	// Score Order List resources
-	if (r = _castArchive->getMovieResourceIfPresent(MKTAG('S', 'o', 'r', 'd'))) {
+	if ((r = _castArchive->getMovieResourceIfPresent(MKTAG('S', 'o', 'r', 'd'))) != nullptr) {
 		loadSord(*r);
 		delete r;
 	}
diff --git a/engines/director/movie.cpp b/engines/director/movie.cpp
index 240d7ebf490..7e9e1c3e2fe 100644
--- a/engines/director/movie.cpp
+++ b/engines/director/movie.cpp
@@ -130,7 +130,7 @@ bool Movie::loadArchive() {
 	// Wait to handle _stageColor until palette is loaded in loadCast...
 
 	// File Info
-	if (r = _movieArchive->getMovieResourceIfPresent(MKTAG('V', 'W', 'F', 'I'))) {
+	if ((r = _movieArchive->getMovieResourceIfPresent(MKTAG('V', 'W', 'F', 'I'))) != nullptr) {
 		loadFileInfo(*r);
 		delete r;
 	}
@@ -174,7 +174,7 @@ bool Movie::loadArchive() {
 	delete r;
 
 	// Action list
-	if (r = _movieArchive->getMovieResourceIfPresent(MKTAG('V', 'W', 'A', 'C'))) {
+	if ((r = _movieArchive->getMovieResourceIfPresent(MKTAG('V', 'W', 'A', 'C'))) != nullptr) {
 		_score->loadActions(*r);
 		delete r;
 	}




More information about the Scummvm-git-logs mailing list