From 663058cdabd460eddff6ec41ef00d2530b978223 Mon Sep 17 00:00:00 2001 From: "rodrigodemoura@gmail.com" Date: Thu, 13 Oct 2011 18:00:16 +0000 Subject: [PATCH] Remove all _Myfirs from vectors. --- projects/mtg/src/CardPrimitive.cpp | 2 +- projects/mtg/src/ManaCost.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/projects/mtg/src/CardPrimitive.cpp b/projects/mtg/src/CardPrimitive.cpp index e6b291879..fb6030c33 100644 --- a/projects/mtg/src/CardPrimitive.cpp +++ b/projects/mtg/src/CardPrimitive.cpp @@ -134,7 +134,7 @@ void CardPrimitive::setColor(const string& _color, int removeAllOthers) { for( size_t i =0 ; i< Constants::MTGColorStrings.size(); i++) { - if (_color.compare(Constants::MTGColorStrings._Myfirst[i]) == 0) + if (_color.compare(Constants::MTGColorStrings[i]) == 0) return setColor(i, removeAllOthers); } //Keep artifact compare, to Remove this we need change all MTG.txt diff --git a/projects/mtg/src/ManaCost.cpp b/projects/mtg/src/ManaCost.cpp index d7a7efb6f..0cdcd1d5d 100644 --- a/projects/mtg/src/ManaCost.cpp +++ b/projects/mtg/src/ManaCost.cpp @@ -250,7 +250,7 @@ ManaCost::ManaCost(vector& _cost, int nb_elems) init(); for (int i = 0; i < nb_elems; i++) { - cost[_cost._Myfirst[i * 2]] = _cost._Myfirst[i * 2 + 1]; + cost[_cost[i * 2]] = _cost[i * 2 + 1]; } } @@ -638,7 +638,7 @@ int ManaCost::isPositive() for (int i = 0; i < Constants::NB_Colors; i++) { - if (cost._Myfirst[i] < 0) + if (cost[i] < 0) { return 0; } @@ -696,7 +696,7 @@ ManaCost * ManaCost::Diff(ManaCost * _cost) for (int i = 0; i < Constants::NB_Colors; i++) { diff[i * 2] = i; - diff[i * 2 + 1] = cost._Myfirst[i] - _cost->getCost(i); + diff[i * 2 + 1] = cost[i] - _cost->getCost(i); } int hybridResult = tryToPayHybrids(_cost->hybrids, _cost->hybrids.size(), diff); if (!hybridResult)