diff --git a/game/pldrack.cpp b/game/pldrack.cpp index a8f0422..6c56cc0 100644 --- a/game/pldrack.cpp +++ b/game/pldrack.cpp @@ -3,7 +3,7 @@ * Authors: Antoine Fraboulet * Olivier Teuliere * - * $Id: pldrack.cpp,v 1.3 2005/04/02 18:05:21 ipkiss Exp $ + * $Id: pldrack.cpp,v 1.4 2005/04/02 18:21:24 ipkiss Exp $ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -138,7 +138,7 @@ void PlayedRack::setNew(const Rack &iRack) } -bool PlayedRack::checkRack(int iMin) +bool PlayedRack::checkRack(int iMin) const { vector::const_iterator it; int v = 0; @@ -160,13 +160,8 @@ bool PlayedRack::checkRack(int iMin) void PlayedRack::operator=(const PlayedRack &iOther) { - vector::const_iterator it; - m_oldTiles.clear(); - for (it = iOther.m_oldTiles.begin(); it != iOther.m_oldTiles.end(); it++) - m_oldTiles.push_back(*it); - m_newTiles.clear(); - for (it = iOther.m_newTiles.begin(); it != iOther.m_newTiles.end(); it++) - m_newTiles.push_back(*it); + m_oldTiles = iOther.m_oldTiles; + m_newTiles = iOther.m_newTiles; } diff --git a/game/pldrack.h b/game/pldrack.h index d5c027a..5df38ad 100644 --- a/game/pldrack.h +++ b/game/pldrack.h @@ -3,7 +3,7 @@ * Authors: Antoine Fraboulet * Olivier Teuliere * - * $Id: pldrack.h,v 1.6 2005/04/02 18:05:21 ipkiss Exp $ + * $Id: pldrack.h,v 1.7 2005/04/02 18:21:24 ipkiss Exp $ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -63,7 +63,7 @@ public: void getOldTiles(vector &oTiles) const; void getAllTiles(vector &oTiles) const; - bool checkRack(int iMin); + bool checkRack(int iMin) const; void operator=(const PlayedRack &iOther); void toString(string&) const;