diff options
author | Erwin Coumans <erwincoumans@google.com> | 2019-05-30 10:30:08 -0700 |
---|---|---|
committer | Erwin Coumans <erwincoumans@google.com> | 2019-05-30 10:30:08 -0700 |
commit | 6b9b30786fed8e40046dc741e6362e6d7967bc02 (patch) | |
tree | fb157ad7a39e300d25cfe8d6e61d18790ca83ab9 | |
parent | 7a7652fd434430a61bcc1724df7d3d4469d2bada (diff) | |
download | bullet3-6b9b30786fed8e40046dc741e6362e6d7967bc02.tar.gz |
simplify previous commit do/while -> while
-rw-r--r-- | examples/Importers/ImportMJCFDemo/BulletMJCFImporter.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/examples/Importers/ImportMJCFDemo/BulletMJCFImporter.cpp b/examples/Importers/ImportMJCFDemo/BulletMJCFImporter.cpp index 253a338e0..7714a52fb 100644 --- a/examples/Importers/ImportMJCFDemo/BulletMJCFImporter.cpp +++ b/examples/Importers/ImportMJCFDemo/BulletMJCFImporter.cpp @@ -1458,13 +1458,9 @@ bool BulletMJCFImporter::loadMJCF(const char* fileName, MJCFErrorLogger* logger, char destBuffer[8192]; char* line = 0; - do + while (m_data->m_fileIO->readLine(fileId, destBuffer, 8192)) { - line = m_data->m_fileIO->readLine(fileId, destBuffer, 8192); - if (line) - { - xml_string += (std::string(destBuffer) + "\n"); - } + xml_string += (std::string(destBuffer) + "\n"); } while (line); m_data->m_fileIO->fileClose(fileId); |