[Scummvm-cvs-logs] scummvm master -> 48b53aa4c6aa01ec113fa0342eb77bc3f0c3abbe

bluegr bluegr at gmail.com
Fri Mar 11 06:30:31 CET 2016


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:
48b53aa4c6 SCI32: Avoid usage of delegated constructors


Commit: 48b53aa4c6aa01ec113fa0342eb77bc3f0c3abbe
    https://github.com/scummvm/scummvm/commit/48b53aa4c6aa01ec113fa0342eb77bc3f0c3abbe
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2016-03-11T07:30:15+02:00

Commit Message:
SCI32: Avoid usage of delegated constructors

Although this feature reduces code duplication, GCC throws the
following: "warning: delegating constructors only available with
-std=c++11 or -std=gnu++11".

Changed paths:
    engines/sci/graphics/remap.h



diff --git a/engines/sci/graphics/remap.h b/engines/sci/graphics/remap.h
index 7ee9962..eb7718d 100644
--- a/engines/sci/graphics/remap.h
+++ b/engines/sci/graphics/remap.h
@@ -85,7 +85,17 @@ struct RemapParams {
 	byte remap[256];
 	bool colorChanged[256];
 
-	RemapParams() : RemapParams(0, 0, 0, 0, 100, kRemappingNone) {
+	RemapParams() {
+		from = to = base = gray = oldGray = percent = oldPercent = 0;
+		type = kRemappingNone;
+
+		// curColor and targetColor are initialized in GfxRemap32::initColorArrays
+		memset(curColor, 0, 256 * sizeof(Color));
+		memset(targetColor, 0, 256 * sizeof(Color));
+		memset(distance, 0, 256);
+		for (int i = 0; i < 236; i++)
+			remap[i] = i;
+		memset(colorChanged, true, 256);
 	}
 
 	RemapParams(byte from_, byte to_, byte base_, byte gray_, byte percent_, ColorRemappingType type_) {






More information about the Scummvm-git-logs mailing list