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

waltervn walter at vanniftrik-it.nl
Fri Dec 23 23:49:13 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:
3c07d75825 ADL: Fix warnings


Commit: 3c07d75825bb0907987210accd9e2a7f4c00176b
    https://github.com/scummvm/scummvm/commit/3c07d75825bb0907987210accd9e2a7f4c00176b
Author: Walter van Niftrik (walter at scummvm.org)
Date: 2016-12-23T23:47:25+01:00

Commit Message:
ADL: Fix warnings

Changed paths:
    engines/adl/adl.h
    engines/adl/adl_v2.cpp
    engines/adl/hires1.cpp


diff --git a/engines/adl/adl.h b/engines/adl/adl.h
index 4b644cc..2b336c9 100644
--- a/engines/adl/adl.h
+++ b/engines/adl/adl.h
@@ -85,7 +85,8 @@ struct Room {
 	Room() :
 			description(0),
 			picture(0),
-			curPicture(0) {
+			curPicture(0),
+			isFirstTime(true) {
 		memset(connections, 0, sizeof(connections));
 	}
 
@@ -153,6 +154,8 @@ struct Item {
 	byte description;
 	Common::Array<byte> roomPictures;
 	bool isOnScreen;
+
+	Item() : id(0), noun(0), region(0), room(0), picture(0), isLineArt(false), state(0), description(0), isOnScreen(false) { }
 };
 
 struct Time {
diff --git a/engines/adl/adl_v2.cpp b/engines/adl/adl_v2.cpp
index 8670bd0..c3e8211 100644
--- a/engines/adl/adl_v2.cpp
+++ b/engines/adl/adl_v2.cpp
@@ -367,7 +367,8 @@ DataBlockPtr AdlEngine_v2::readDataBlockPtr(Common::ReadStream &f) const {
 void AdlEngine_v2::loadItems(Common::ReadStream &stream) {
 	byte id;
 	while ((id = stream.readByte()) != 0xff && !stream.eos() && !stream.err()) {
-		Item item = Item();
+		Item item;
+
 		item.id = id;
 		item.noun = stream.readByte();
 		item.room = stream.readByte();
diff --git a/engines/adl/hires1.cpp b/engines/adl/hires1.cpp
index 8bd49c7..e811b74 100644
--- a/engines/adl/hires1.cpp
+++ b/engines/adl/hires1.cpp
@@ -318,7 +318,8 @@ void HiRes1Engine::initGameState() {
 	stream->seek(IDI_HR1_OFS_ITEMS);
 	byte id;
 	while ((id = stream->readByte()) != 0xff) {
-		Item item = Item();
+		Item item;
+
 		item.id = id;
 		item.noun = stream->readByte();
 		item.room = stream->readByte();





More information about the Scummvm-git-logs mailing list