[Scummvm-cvs-logs] scummvm master -> fa401a2d3d26e1f41e1831dec5f35f1120ec8910

lordhoto lordhoto at gmail.com
Sun Jan 29 16:37:39 CET 2012


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

Summary:
db98fdab2b COMMON: Return 0 instead of false in FSNode::createReadStream.
163d57ba93 AUDIO: Return 0 instead of false in Tfmx::loadSampleFile.
21fb4af154 SWORD25: Return 0 instead of false in Screenshot::createThumbnail.
fa401a2d3d SCI: Remove unnecessary break after return statement.


Commit: db98fdab2b73547bba4c4346393b3eaa204db9a5
    https://github.com/scummvm/scummvm/commit/db98fdab2b73547bba4c4346393b3eaa204db9a5
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2012-01-29T07:31:52-08:00

Commit Message:
COMMON: Return 0 instead of false in FSNode::createReadStream.

This should "fix" some g++ warnings.

Changed paths:
    common/fs.cpp



diff --git a/common/fs.cpp b/common/fs.cpp
index 8ea96e4..0143c93 100644
--- a/common/fs.cpp
+++ b/common/fs.cpp
@@ -130,10 +130,10 @@ SeekableReadStream *FSNode::createReadStream() const {
 
 	if (!_realNode->exists()) {
 		warning("FSNode::createReadStream: '%s' does not exist", getName().c_str());
-		return false;
+		return 0;
 	} else if (_realNode->isDirectory()) {
 		warning("FSNode::createReadStream: '%s' is a directory", getName().c_str());
-		return false;
+		return 0;
 	}
 
 	return _realNode->createReadStream();


Commit: 163d57ba9399664b080079abe6f4d8c0c98db89c
    https://github.com/scummvm/scummvm/commit/163d57ba9399664b080079abe6f4d8c0c98db89c
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2012-01-29T07:32:44-08:00

Commit Message:
AUDIO: Return 0 instead of false in Tfmx::loadSampleFile.

This should "fix" a g++ warning.

Changed paths:
    audio/mods/tfmx.cpp



diff --git a/audio/mods/tfmx.cpp b/audio/mods/tfmx.cpp
index 8d58480..2957529 100644
--- a/audio/mods/tfmx.cpp
+++ b/audio/mods/tfmx.cpp
@@ -876,7 +876,7 @@ const int8 *Tfmx::loadSampleFile(uint32 &sampleLen, Common::SeekableReadStream &
 	const int32 sampleSize = sampleStream.size();
 	if (sampleSize < 4) {
 		warning("Tfmx: Cant load Samplefile");
-		return false;
+		return 0;
 	}
 
 	int8 *sampleAlloc = new int8[sampleSize];


Commit: 21fb4af15494e8a39c08e88a8d51f26f6ed58dff
    https://github.com/scummvm/scummvm/commit/21fb4af15494e8a39c08e88a8d51f26f6ed58dff
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2012-01-29T07:33:43-08:00

Commit Message:
SWORD25: Return 0 instead of false in Screenshot::createThumbnail.

This should "fix" a g++ warning.

Changed paths:
    engines/sword25/gfx/screenshot.cpp



diff --git a/engines/sword25/gfx/screenshot.cpp b/engines/sword25/gfx/screenshot.cpp
index de7b62f..0ea4bff 100644
--- a/engines/sword25/gfx/screenshot.cpp
+++ b/engines/sword25/gfx/screenshot.cpp
@@ -74,7 +74,7 @@ Common::SeekableReadStream *Screenshot::createThumbnail(Graphics::Surface *data)
 	// The source image must be 800x600.
 	if (data->w != 800 || data->h != 600 || data->format.bytesPerPixel != 4) {
 		error("The sreenshot dimensions have to be 800x600 in order to be saved as a thumbnail.");
-		return false;
+		return 0;
 	}
 
 	// Buffer for the output thumbnail


Commit: fa401a2d3d26e1f41e1831dec5f35f1120ec8910
    https://github.com/scummvm/scummvm/commit/fa401a2d3d26e1f41e1831dec5f35f1120ec8910
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2012-01-29T07:34:41-08:00

Commit Message:
SCI: Remove unnecessary break after return statement.

Changed paths:
    engines/sci/engine/kpathing.cpp



diff --git a/engines/sci/engine/kpathing.cpp b/engines/sci/engine/kpathing.cpp
index 375aeaa..089b325 100644
--- a/engines/sci/engine/kpathing.cpp
+++ b/engines/sci/engine/kpathing.cpp
@@ -1545,7 +1545,6 @@ reg_t kAvoidPath(EngineState *s, int argc, reg_t *argv) {
 	default:
 		warning("Unknown AvoidPath subfunction %d", argc);
 		return NULL_REG;
-		break;
 	}
 }
 






More information about the Scummvm-git-logs mailing list