From fbcb1a14fc1db7ec495f9cba0970c807dd53bf15 Mon Sep 17 00:00:00 2001 From: Marek Kochanowicz Date: Wed, 15 Jan 2014 11:12:56 +0100 Subject: [PATCH] ooops, using search id --- apps/opencs/model/tools/referenceablecheck.cpp | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/apps/opencs/model/tools/referenceablecheck.cpp b/apps/opencs/model/tools/referenceablecheck.cpp index ed0fec1da..62b2a5172 100644 --- a/apps/opencs/model/tools/referenceablecheck.cpp +++ b/apps/opencs/model/tools/referenceablecheck.cpp @@ -765,18 +765,7 @@ void CSMTools::ReferenceableCheckStage::npcCheck( } else //checking if there is a such race { - bool noSuchRace(true); - - for (int i = 0; i < mRaces.getSize(); ++i) - { - if (Misc::StringUtils::ciEqual(dynamic_cast(mRaces.getRecord(i).get()).mId, npc.mRace)) - { - noSuchRace = false; - break; - } - } - - if (noSuchRace) + if ((!mRaces.searchId(npc.mRace))) { messages.push_back(id.toString() + "|" + npc.mId + " has invalid race"); }