[Scummvm-cvs-logs] scummvm master -> 98affc01a6f5cce4ce4db2a164c3972203e7a068

lordhoto lordhoto at gmail.com
Mon Apr 25 16:11:46 CEST 2011


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:
aee0fa34bf BASE: Remove unused variable in DO_OPTION_INT.
33a88e5cac PNG: This PNG::getPalette.
98affc01a6 TSAGE: Add virtual destructor to Game class.


Commit: aee0fa34bf5ea2ce474a2ae67f7722df4929d4a5
    https://github.com/scummvm/scummvm/commit/aee0fa34bf5ea2ce474a2ae67f7722df4929d4a5
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2011-04-25T06:26:23-07:00

Commit Message:
BASE: Remove unused variable in DO_OPTION_INT.

Changed paths:
    base/commandLine.cpp



diff --git a/base/commandLine.cpp b/base/commandLine.cpp
index 7c482d3..bb2141b 100644
--- a/base/commandLine.cpp
+++ b/base/commandLine.cpp
@@ -262,7 +262,7 @@ void registerDefaults() {
 #define DO_OPTION_INT(shortCmd, longCmd) \
 	DO_OPTION(shortCmd, longCmd) \
 	char *endptr = 0; \
-	int intValue; intValue = (int)strtol(option, &endptr, 0); \
+	strtol(option, &endptr, 0); \
 	if (endptr == NULL || *endptr != 0) usage("--%s: Invalid number '%s'", longCmd, option);
 
 // Use this for boolean options; this distinguishes between "-x" and "-X",


Commit: 33a88e5cacb35e04c947abe38565423544605fcf
    https://github.com/scummvm/scummvm/commit/33a88e5cacb35e04c947abe38565423544605fcf
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2011-04-25T06:45:05-07:00

Commit Message:
PNG: This PNG::getPalette.

Formerly the palette parameter was a value copy, which was assigned in
getPalette. That did not make much sense, thus I changed it to be a reference.
Since I am not quite sure whether this really shouldn't make a palette copy
I added an TODO comment about it.

Changed paths:
    graphics/png.h



diff --git a/graphics/png.h b/graphics/png.h
index 70f2e4b..00c084d 100644
--- a/graphics/png.h
+++ b/graphics/png.h
@@ -121,9 +121,13 @@ public:
 	 *
 	 * Note that the palette's format is RGBA.
 	 */
-	void getPalette(byte *palette, uint16 &entries) {
+	void getPalette(byte *&palette, uint16 &entries) {
 		if (_header.colorType != kIndexed)
 			error("Palette requested for a non-indexed PNG");
+		// TODO: It might be that this should really return a copy of the
+		// palette, but since the implementation was like this I changed
+		// the palette pointer to be a reference instead of a value copy.
+		// Someone should check this code and verify this is as intended.
 		palette = _palette;
 		entries = _paletteEntries;
 	}


Commit: 98affc01a6f5cce4ce4db2a164c3972203e7a068
    https://github.com/scummvm/scummvm/commit/98affc01a6f5cce4ce4db2a164c3972203e7a068
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2011-04-25T06:50:41-07:00

Commit Message:
TSAGE: Add virtual destructor to Game class.

Changed paths:
    engines/tsage/core.h



diff --git a/engines/tsage/core.h b/engines/tsage/core.h
index 51af41e..85f4b42 100644
--- a/engines/tsage/core.h
+++ b/engines/tsage/core.h
@@ -914,6 +914,8 @@ protected:
 	static bool notLockedFn(GameHandler *g);
 	virtual void handleSaveLoad(bool saveFlag, int &saveSlot, Common::String &saveName) {}
 public:
+	virtual ~Game() {}
+
 	void addHandler(GameHandler *entry) { _handlers.push_back(entry); }
 	void removeHandler(GameHandler *entry) { _handlers.remove(entry); }
 






More information about the Scummvm-git-logs mailing list