Skip to content

Commit

Permalink
Fixed release builds by extracting load code from assert
Browse files Browse the repository at this point in the history
Fixes #7
  • Loading branch information
COM8 committed Mar 4, 2023
1 parent 438cf52 commit e7876b8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/jutta_bt_proto/CoffeeMakerLoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,8 @@ std::shared_ptr<Joe> load_joe(const Machine* machine) {
tinyxml2::XMLDocument doc;
std::string path = "machinefiles/" + machine->fileName + ".xml";
SPDLOG_INFO("Loading JOE from '{}'...", path);
assert(doc.LoadFile(path.c_str()) == tinyxml2::XML_SUCCESS);
tinyxml2::XMLError result = doc.LoadFile(path.c_str());
assert(result == tinyxml2::XML_SUCCESS);
tinyxml2::XMLElement* joe = doc.FirstChildElement("JOE");

std::string dated = joe->Attribute("dated");
Expand Down

0 comments on commit e7876b8

Please sign in to comment.