From 48b53aa4c6aa01ec113fa0342eb77bc3f0c3abbe Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Fri, 11 Mar 2016 07:30:15 +0200 Subject: 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". --- engines/sci/graphics/remap.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/engines/sci/graphics/remap.h b/engines/sci/graphics/remap.h index 7ee9962ba3..eb7718d507 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_) { -- cgit v1.2.3