Skip to content

Commit

Permalink
Cleanup of unused variables.
Browse files Browse the repository at this point in the history
  • Loading branch information
vidanovic committed Oct 21, 2024
1 parent c002b0e commit c1b7228
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 19 deletions.
18 changes: 0 additions & 18 deletions src/Parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1006,24 +1006,6 @@ OpticsParser::ProductData parseIGSDBJson(nlohmann::json const & product_json)
msg << "Cannot open file: " << fname;
throw std::runtime_error(msg.str());

#if 0
// Checking to see if the file exists this way because sometimes XMLParser
// tries to open a messagebox and because std::filesystem support is not
// necessairly universal in users. This should hopefully ensure an exception
// for trying to open a file that doesn't exist is propagated through the python
// bindings for pywincalc
std::ifstream inFile(fname);
if(!inFile.is_open())
{
std::stringstream msg;
msg << "Cannot open file: " << fname;
throw std::runtime_error(msg.str());
}
inFile.close();
XMLParser::XMLNode xWindowElementNode =
XMLParser::XMLNode::openFileHelperThrows(fname.c_str(), "WindowElement");
return parseBSDFXML(xWindowElementNode);
#endif
return {};
}
} // namespace OpticsParser
2 changes: 1 addition & 1 deletion src/factories/bsdfxml.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ namespace OpticsParser

product.productName = matData.name;
product.manufacturer = matData.manufacturer.value_or("");
auto thickness = matData.thickness;

if(matData.thickness.has_value())
{
product.thicknessUnit = BSDFData::LengthUnitToString(matData.thickness->unit);
Expand Down

0 comments on commit c1b7228

Please sign in to comment.