From c67390be88b93ef49988091794ba314ad5f71ade Mon Sep 17 00:00:00 2001 From: "jean.chalard" Date: Fri, 19 Feb 2010 10:20:18 +0000 Subject: [PATCH] J : * Fix a wrong cast. --- projects/mtg/src/GameStateDeckViewer.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/projects/mtg/src/GameStateDeckViewer.cpp b/projects/mtg/src/GameStateDeckViewer.cpp index 6dbd4069c..04028d508 100644 --- a/projects/mtg/src/GameStateDeckViewer.cpp +++ b/projects/mtg/src/GameStateDeckViewer.cpp @@ -14,18 +14,16 @@ //!! helper function; this is probably handled somewhere in the code already. // If not, should be placed in general library void StringExplode(string str, string separator, vector* results){ - int found; + size_t found; found = str.find_first_of(separator); - while(found != (int)string::npos){ - if(found > 0){ + while (found != string::npos){ + if (found > 0) results->push_back(str.substr(0,found)); - } str = str.substr(found+1); found = str.find_first_of(separator); } - if(str.length() > 0){ + if (str.length() > 0) results->push_back(str); - } } GameStateDeckViewer::GameStateDeckViewer(GameApp* parent): GameState(parent) {