workaround for an out-of-date tinyxml2 version

This commit is contained in:
Erwin Coumans committed 2018-05-17 12:18:17 -07:00
1 parent 034dfba3ae
commit ff646fbef2
2 files changed
+22 -3

No files matched your search

@@ -241,7 +241,11 @@ struct BulletMJCFImporterInternalData
return buf;
#else
char row[1024];
#ifdef G3_TINYXML2
sprintf(row,"unknown line, upgrade tinyxml2 version!");
#else
sprintf(row,"%d",e->GetLineNum());
#endif
std::string str = m_sourceFileName.c_str() + std::string(":") + std::string(row);
return str;
#endif
@@ -1491,8 +1495,12 @@ bool BulletMJCFImporter::parseMJCFString(const char* xmlText, MJCFErrorLogger* l
xml_doc.Parse(xmlText);
if (xml_doc.Error())
{
#ifdef G3_TINYXML2
logger->reportError("xml reading error (upgrade tinyxml2 version!");
#else
logger->reportError(xml_doc.ErrorStr());
xml_doc.ClearError();
#endif
return false;
}