[Scummvm-cvs-logs] SF.net SVN: scummvm:[53603] scummvm/trunk/engines/sword25/math/polygon.h

dreammaster at users.sourceforge.net dreammaster at users.sourceforge.net
Tue Oct 19 11:23:20 CEST 2010


Revision: 53603
          http://scummvm.svn.sourceforge.net/scummvm/?rev=53603&view=rev
Author:   dreammaster
Date:     2010-10-19 09:23:20 +0000 (Tue, 19 Oct 2010)

Log Message:
-----------
SWORD25: Added operator= to Polygon class

This fixes a corruption where vertice arrays were being copied directly and destroyed prematurely

Modified Paths:
--------------
    scummvm/trunk/engines/sword25/math/polygon.h

Modified: scummvm/trunk/engines/sword25/math/polygon.h
===================================================================
--- scummvm/trunk/engines/sword25/math/polygon.h	2010-10-19 08:12:04 UTC (rev 53602)
+++ scummvm/trunk/engines/sword25/math/polygon.h	2010-10-19 09:23:20 UTC (rev 53603)
@@ -193,6 +193,11 @@
 	virtual bool persist(OutputPersistenceBlock &writer);
 	virtual bool unpersist(InputPersistenceBlock &reader);
 
+	Polygon &operator=(const Polygon &p) {
+		init(p.vertexCount, p.vertices);
+		return *this;
+	}
+
 private:
 	bool _isCW;
 	bool _isConvex;


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list