1
0
mirror of https://github.com/preble/libpinproc synced 2026-02-24 18:25:23 +01:00

changes for latest yaml-cpp and CPP 11

This commit is contained in:
darren
2019-05-29 14:06:19 -07:00
parent bd0046c144
commit dfe55cf217
3 changed files with 15 additions and 21 deletions

View File

@@ -46,12 +46,8 @@ PRResult LoadConfiguration(YAML::Node& yamlDoc, const char *yamlFilePath)
fprintf(stderr, "YAML file not found: %s\n", yamlFilePath);
return kPRFailure;
}
YAML::Parser parser(fin);
while(parser)
{
parser.GetNextDocument(yamlDoc);
}
yamlDoc = YAML::Load(fin);
}
// catch (YAML::ParserException& ex)
// {
@@ -341,8 +337,7 @@ int main(int argc, const char **argv)
return 1;
}
std::string machineTypeString;
yamlDoc["PRGame"]["machineType"] >> machineTypeString;
std::string machineTypeString = yamlDoc["PRGame"]["machineType"].as<std::string>();
if (machineTypeString == "wpc")
machineType = kPRMachineWPC;
else if (machineTypeString == "wpc95")