diff options
| author | Ben Boeckel <MathStuf@gmail.com> | 2009-01-08 12:10:51 -0500 |
|---|---|---|
| committer | Ben Boeckel <MathStuf@gmail.com> | 2009-01-08 12:10:51 -0500 |
| commit | 70d5061d020aba0429c0a3a1be174e6f2a4f8e33 (patch) | |
| tree | ebb0ae8171da86c6faa32d548276c8d6df2906ab /sigmod/MapTrainerTeamMember.cpp | |
| parent | a6d45a0715bc87ca918ae9440bf8990a705f60c7 (diff) | |
| download | sigen-70d5061d020aba0429c0a3a1be174e6f2a4f8e33.tar.gz sigen-70d5061d020aba0429c0a3a1be174e6f2a4f8e33.tar.xz sigen-70d5061d020aba0429c0a3a1be174e6f2a4f8e33.zip | |
Fixed up clear() for other classes to clean lists as well
Diffstat (limited to 'sigmod/MapTrainerTeamMember.cpp')
| -rw-r--r-- | sigmod/MapTrainerTeamMember.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/sigmod/MapTrainerTeamMember.cpp b/sigmod/MapTrainerTeamMember.cpp index 29238063..bfe34d66 100644 --- a/sigmod/MapTrainerTeamMember.cpp +++ b/sigmod/MapTrainerTeamMember.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2007-2008 Ben Boeckel <MathStuf@gmail.com> + * Copyright 2007-2009 Ben Boeckel <MathStuf@gmail.com> * * 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 @@ -175,6 +175,7 @@ Sigmod::MapTrainerTeamMember& Sigmod::MapTrainerTeamMember::operator=(const MapT { if (this == &rhs) return *this; + clear(); COPY(species); COPY(level); COPY(ability); @@ -198,3 +199,11 @@ bool Sigmod::MapTrainerTeamMember::checkWeight(const int item) } return (totalWeight <= species->maxHoldWeight()); } + +void Sigmod::MapTrainerTeamMember::clear() +{ + m_ability.clear(); + m_item.clear(); + m_move.clear(); + m_nature.clear(); +} |
