[Scummvm-git-logs] scummvm master -> 3b2bdd3a89bf75957b9139b0f5061df516b03632

wjp wjp at usecode.org
Tue Aug 30 21:54:54 CEST 2016


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

Summary:
d60879b535 SDL: Fix const cast
fb592a0dbd BACKENDS: Rename variable shadowing function
3b2bdd3a89 COMMON: Fix sign warning


Commit: d60879b535076f6d513755c918f80b905dd352a9
    https://github.com/scummvm/scummvm/commit/d60879b535076f6d513755c918f80b905dd352a9
Author: Willem Jan Palenstijn (wjp at usecode.org)
Date: 2016-08-30T21:52:27+02:00

Commit Message:
SDL: Fix const cast

Changed paths:
    backends/graphics/surfacesdl/surfacesdl-graphics.cpp



diff --git a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
index b4b0d33..fdf2101 100644
--- a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
+++ b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
@@ -2308,7 +2308,7 @@ void SurfaceSdlGraphicsManager::blitOSDMessage(SDL_Rect dstRect) {
 	Graphics::PixelFormat dstFormat = _osdFormat;
 	for (int y = 0; y < dstRect.h; y++) {
 		const byte *srcRow = (const byte *)((const byte *)(src->pixels) + y * src->pitch); //src (x, y) == (0, 0)
-		byte *dstRow = (byte *)((const byte *)(dst->pixels) + (dstRect.y + y) * dst->pitch + dstRect.x * dstFormat.bytesPerPixel);
+		byte *dstRow = (byte *)((byte *)(dst->pixels) + (dstRect.y + y) * dst->pitch + dstRect.x * dstFormat.bytesPerPixel);
 
 		for (int x = 0; x < dstRect.w; x++) {
 			uint32 srcColor;


Commit: fb592a0dbda7b57c38b643e4f04ca9640c6986af
    https://github.com/scummvm/scummvm/commit/fb592a0dbda7b57c38b643e4f04ca9640c6986af
Author: Willem Jan Palenstijn (wjp at usecode.org)
Date: 2016-08-30T21:53:21+02:00

Commit Message:
BACKENDS: Rename variable shadowing function

Changed paths:
    backends/fs/chroot/chroot-fs.cpp
    backends/fs/posix/posix-fs.cpp



diff --git a/backends/fs/chroot/chroot-fs.cpp b/backends/fs/chroot/chroot-fs.cpp
index f5f7c84..be6805b 100644
--- a/backends/fs/chroot/chroot-fs.cpp
+++ b/backends/fs/chroot/chroot-fs.cpp
@@ -108,7 +108,7 @@ Common::WriteStream *ChRootFilesystemNode::createWriteStream() {
 	return _realNode->createWriteStream();
 }
 
-bool ChRootFilesystemNode::create(bool isDirectory) {
+bool ChRootFilesystemNode::create(bool /*isDir*/) {
 	error("Not supported");
 	return false;
 }
diff --git a/backends/fs/posix/posix-fs.cpp b/backends/fs/posix/posix-fs.cpp
index 8597158..746ae6a 100644
--- a/backends/fs/posix/posix-fs.cpp
+++ b/backends/fs/posix/posix-fs.cpp
@@ -253,10 +253,10 @@ Common::WriteStream *POSIXFilesystemNode::createWriteStream() {
 	return StdioStream::makeFromPath(getPath(), true);
 }
 
-bool POSIXFilesystemNode::create(bool isDirectory) {
+bool POSIXFilesystemNode::create(bool isDir) {
 	bool success;
 
-	if (isDirectory) {
+	if (isDir) {
 		success = mkdir(_path.c_str(), 0755) == 0;
 	} else {
 		int fd = open(_path.c_str(), O_WRONLY | O_CREAT | O_TRUNC, 0755);
@@ -270,12 +270,12 @@ bool POSIXFilesystemNode::create(bool isDirectory) {
 	if (success) {		
 		setFlags();
 		if (_isValid) {
-			if (_isDirectory != isDirectory) warning("failed to create %s: got %s", isDirectory ? "directory" : "file", _isDirectory ? "directory" : "file");			
-			return _isDirectory == isDirectory;
+			if (_isDirectory != isDir) warning("failed to create %s: got %s", isDir ? "directory" : "file", _isDirectory ? "directory" : "file");
+			return _isDirectory == isDir;
 		}
 
 		warning("POSIXFilesystemNode: %s() was a success, but stat indicates there is no such %s",
-			isDirectory ? "mkdir" : "creat", isDirectory ? "directory" : "file");
+			isDir ? "mkdir" : "creat", isDir ? "directory" : "file");
 		return false;
 	}
 


Commit: 3b2bdd3a89bf75957b9139b0f5061df516b03632
    https://github.com/scummvm/scummvm/commit/3b2bdd3a89bf75957b9139b0f5061df516b03632
Author: Willem Jan Palenstijn (wjp at usecode.org)
Date: 2016-08-30T21:53:22+02:00

Commit Message:
COMMON: Fix sign warning

Changed paths:
    common/json.cpp



diff --git a/common/json.cpp b/common/json.cpp
index d0e585a..f999162 100644
--- a/common/json.cpp
+++ b/common/json.cpp
@@ -1092,7 +1092,7 @@ String JSONValue::indent(size_t depth) {
 	const size_t indent_step = 2;
 	depth ? --depth : 0;
 	String indentStr;
-	for (int i = 0; i < depth * indent_step; ++i) indentStr += ' ';
+	for (size_t i = 0; i < depth * indent_step; ++i) indentStr += ' ';
 	return indentStr;
 }
 





More information about the Scummvm-git-logs mailing list