[Scummvm-git-logs] scummvm master -> f476dfcec1ad58fe09fab52cb63e28c02e370736

mduggan noreply at scummvm.org
Mon Sep 23 07:38:56 UTC 2024


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:
f476dfcec1 DGDS: Avoid temp strings to make coverity happier


Commit: f476dfcec1ad58fe09fab52cb63e28c02e370736
    https://github.com/scummvm/scummvm/commit/f476dfcec1ad58fe09fab52cb63e28c02e370736
Author: Matthew Duggan (mgithub at guarana.org)
Date: 2024-09-23T17:37:53+10:00

Commit Message:
DGDS: Avoid temp strings to make coverity happier

Changed paths:
    engines/dgds/parser.cpp


diff --git a/engines/dgds/parser.cpp b/engines/dgds/parser.cpp
index eb21b81213b..44d2dbd5137 100644
--- a/engines/dgds/parser.cpp
+++ b/engines/dgds/parser.cpp
@@ -81,10 +81,8 @@ Common::HashMap<uint16, Common::String> DgdsParser::readTags(Common::SeekableRea
 
 	for (uint16 i = 0; i < count; i++) {
 		uint16 idx = stream->readUint16LE();
-		Common::String string = stream->readString();
-		debug("        %2u: %2u, \"%s\"", i, idx, string.c_str());
-
-		tags[idx] = string;
+		tags[idx] = stream->readString();
+		debug("        %2u: %2u, \"%s\"", i, idx, tags[idx].c_str());
 	}
 
 	return tags;
@@ -139,9 +137,7 @@ bool ADSParser::handleChunk(DgdsChunkReader &chunk, ParserData *data) {
 			if (idx > scriptData->_scriptNames.size())
 				scriptData->_scriptNames.resize(idx);
 
-
-			Common::String string = chunkStream->readString();
-			scriptData->_scriptNames[idx - 1] = string;
+			scriptData->_scriptNames[idx - 1] = chunkStream->readString();
 		}
 	} break;
 	case ID_SCR:




More information about the Scummvm-git-logs mailing list