[Scummvm-cvs-logs] scummvm master -> 1a5026570af441dd4e9e95ba507a9f6b3e0bebbf

lordhoto lordhoto at gmail.com
Tue Dec 27 02:16:42 CET 2011


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:
1a5026570a KYRA: Slight cleanup.


Commit: 1a5026570af441dd4e9e95ba507a9f6b3e0bebbf
    https://github.com/scummvm/scummvm/commit/1a5026570af441dd4e9e95ba507a9f6b3e0bebbf
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2011-12-26T17:15:39-08:00

Commit Message:
KYRA: Slight cleanup.

Changed paths:
    engines/kyra/script_eob.cpp
    engines/kyra/script_eob.h



diff --git a/engines/kyra/script_eob.cpp b/engines/kyra/script_eob.cpp
index e5f26be..ffdb717 100644
--- a/engines/kyra/script_eob.cpp
+++ b/engines/kyra/script_eob.cpp
@@ -157,10 +157,10 @@ EoBInfProcessor::~EoBInfProcessor() {
 	delete[] _flagTable;
 	delete[] _stack;
 	delete[] _scriptData;
-	for (Common::Array<const InfOpcode *>::const_iterator a = _opcodes.begin(); a != _opcodes.end(); ++a) {
-		delete(*a)->proc;
+
+	for (Common::Array<const InfOpcode *>::const_iterator a = _opcodes.begin(); a != _opcodes.end(); ++a)
 		delete *a;
-	}
+
 	_opcodes.clear();
 }
 
diff --git a/engines/kyra/script_eob.h b/engines/kyra/script_eob.h
index 3804db0..66323d6 100644
--- a/engines/kyra/script_eob.h
+++ b/engines/kyra/script_eob.h
@@ -91,8 +91,10 @@ private:
 	Screen_EoB *_screen;
 
 	typedef Common::Functor1Mem<int8*, int, EoBInfProcessor> InfProc;
-	struct InfOpcode {
+	struct InfOpcode : private Common::NonCopyable {
 		InfOpcode(InfProc *p, const char *d) : proc(p), desc(d) {}
+		~InfOpcode() { delete proc; }
+
 		InfProc *proc;
 		Common::String desc;
 	};






More information about the Scummvm-git-logs mailing list