summaryrefslogtreecommitdiffstats
path: root/pokemod/SpeciesEvolution.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'pokemod/SpeciesEvolution.cpp')
-rw-r--r--pokemod/SpeciesEvolution.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/pokemod/SpeciesEvolution.cpp b/pokemod/SpeciesEvolution.cpp
index 28e53dbf..feba5543 100644
--- a/pokemod/SpeciesEvolution.cpp
+++ b/pokemod/SpeciesEvolution.cpp
@@ -80,10 +80,7 @@ bool SpeciesEvolution::validate() const
else
{
for (int i = 0; (i < pokemod->getItemByID(val1)->getEffectCount()) && !ok; ++i)
- {
- if (pokemod->getItemByID(val1)->getEffect(i)->getEffect() == ItemEffect::E_Evolution)
- ok = true;
- }
+ ok = (pokemod->getItemByID(val1)->getEffect(i)->getEffect() == ItemEffect::E_Evolution);
}
break;
}
@@ -181,10 +178,7 @@ void SpeciesEvolution::setVal1(const int v1) throw(Exception)
if (pokemod->getItemIndex(v1) == -1)
throw(BoundsException(className, "val1"));
for (int i = 0; (i < pokemod->getItemByID(v1)->getEffectCount()) && !ok; ++i)
- {
- if (pokemod->getItemByID(v1)->getEffect(i)->getEffect() == ItemEffect::E_Evolution)
- ok = true;
- }
+ ok = (pokemod->getItemByID(v1)->getEffect(i)->getEffect() == ItemEffect::E_Evolution);
if (!ok)
throw(BoundsException(className, "val1"));
break;