diff options
author | Paul Gilbert | 2010-10-19 09:23:20 +0000 |
---|---|---|
committer | Paul Gilbert | 2010-10-19 09:23:20 +0000 |
commit | 3b29bda9a1d98eb5bca748451f763a2ea6523b9e (patch) | |
tree | ba050ed5369b571ba131edbbc5a4251c3fdbcf00 /engines/sword25 | |
parent | 355032d4f9600eea3684cab3166375053fbd9d8b (diff) | |
download | scummvm-rg350-3b29bda9a1d98eb5bca748451f763a2ea6523b9e.tar.gz scummvm-rg350-3b29bda9a1d98eb5bca748451f763a2ea6523b9e.tar.bz2 scummvm-rg350-3b29bda9a1d98eb5bca748451f763a2ea6523b9e.zip |
SWORD25: Added operator= to Polygon class
This fixes a corruption where vertice arrays were being copied directly and destroyed prematurely
svn-id: r53603
Diffstat (limited to 'engines/sword25')
-rw-r--r-- | engines/sword25/math/polygon.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/engines/sword25/math/polygon.h b/engines/sword25/math/polygon.h index 3bd243f666..1b2a0b191c 100644 --- a/engines/sword25/math/polygon.h +++ b/engines/sword25/math/polygon.h @@ -193,6 +193,11 @@ public: 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; |