From: Steve Brokenshire Date: Tue, 29 Dec 2015 00:14:55 +0000 (+0000) Subject: Added MapDataExists subroutines for the Contact Editor loading process. X-Git-Tag: release-0.09~135 X-Git-Url: http://Server1/repobrowser/?p=xestiaab%2F.git;a=commitdiff_plain;h=2077fd3163afbf00561d4d4030a087ffded67a81 Added MapDataExists subroutines for the Contact Editor loading process. --- diff --git a/source/common/textprocessing.cpp b/source/common/textprocessing.cpp index d4aee6b..d979d30 100644 --- a/source/common/textprocessing.cpp +++ b/source/common/textprocessing.cpp @@ -106,6 +106,34 @@ void DeleteMapDataProcess(int IndexNum, std::map* MapData){ MapData->erase(IndexNum); } +bool MapDataExists(int *ItemIndex, std::map *MapPtr){ + + if (MapPtr->find(*ItemIndex) == MapPtr->end()){ + + return FALSE; + + } else { + + return TRUE; + + } + +} + +bool MapDataExists(int *ItemIndex, std::map *MapPtr){ + + if (MapPtr->find(*ItemIndex) == MapPtr->end()){ + + return FALSE; + + } else { + + return TRUE; + + } + +} + /* template void DeleteMapData(ArgMap* ArgMapPtr, Args*... ArgsList){ diff --git a/source/common/textprocessing.h b/source/common/textprocessing.h index 8461393..78ddf2b 100644 --- a/source/common/textprocessing.h +++ b/source/common/textprocessing.h @@ -35,6 +35,9 @@ void DeleteMapDataProcess(int IndexNum, std::map* MapData); void DeleteMapDataProcess(int IndexNum, std::map* MapData); void DeleteMapDataProcess(int IndexNum, std::map* MapData); +bool MapDataExists(int *ItemIndex, std::map *MapPtr); +bool MapDataExists(int *ItemIndex, std::map *MapPtr); + //void DeleteMapDataB() {}; //void DeleteMapData() {};