~cypheon/elfelli

659aa8a7d63568c8a877b47ea58b52772ab2dad2 — Johann Rudloff 14 years ago 2f78c6c
Return error, if there is no valid XML file at all.
1 files changed, 4 insertions(+), 1 deletions(-)

M src/XmlLoader.cpp
M src/XmlLoader.cpp => src/XmlLoader.cpp +4 -1
@@ 41,7 41,7 @@ inline float str_to_float(const std::string& str)
namespace Elfelli
{

  const char *XmlLoader::version_string = "elfelli-xml-1";
const char *XmlLoader::version_string = "elfelli-xml-1";

XmlLoader::XmlLoader()
{


@@ 76,6 76,9 @@ int XmlLoader::load(const char *filename, Simulation *target)
  XML_SetStartElementHandler(parser, XmlLoader::start_element);
  XML_ParseBuffer(parser, std::strlen(reinterpret_cast<char *>(buf)), 1);

  if(!scene_started)
    return 1;

  return errors;
}