Skip to content

Commit 3b54588

Browse files
committed
Added ability to select variations by model name
1 parent 987ff61 commit 3b54588

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

ModelVariations/IniParse.hpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
#include <vector>
44
#include <IniReader.h>
55

6+
#include <CModelInfo.h>
7+
68
inline std::vector<unsigned short> vectorUnion(std::vector<unsigned short>& vec1, std::vector<unsigned short>& vec2)
79
{
810
std::vector<unsigned short> vec;
@@ -30,6 +32,7 @@ inline std::vector<unsigned short> iniLineParser(std::string section, std::strin
3032
strcpy(tkString, iniString.c_str());
3133

3234
char* token = strtok(tkString, ",");
35+
int modelid = 0;
3336

3437
while (token != NULL)
3538
{
@@ -40,6 +43,8 @@ inline std::vector<unsigned short> iniLineParser(std::string section, std::strin
4043
}
4144
else if(token[0] >= '0' && token[0] <= '9')
4245
retVector.push_back((unsigned short)atoi(token));
46+
else if (CModelInfo::GetModelInfo(token, &modelid) != NULL)
47+
retVector.push_back((unsigned short)modelid);
4348

4449
token = strtok(NULL, ",");
4550
}

ModelVariations/ModelVariations.vcxproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@
8585
<LanguageStandard>stdcpplatest</LanguageStandard>
8686
<ExternalWarningLevel>TurnOffAllWarnings</ExternalWarningLevel>
8787
<TreatAngleIncludeAsExternal>true</TreatAngleIncludeAsExternal>
88+
<DisableSpecificWarnings>5045;%(DisableSpecificWarnings)</DisableSpecificWarnings>
8889
</ClCompile>
8990
<Link>
9091
<GenerateDebugInformation>Debug</GenerateDebugInformation>

0 commit comments

Comments
 (0)