- Use obstacks for memory allocation for lispfiles and DrawingRequests,
[supertux.git] / src / sprite / sprite_manager.cpp
index 0878e62..f1de683 100644 (file)
@@ -69,15 +69,15 @@ SpriteData*
 SpriteManager::load(const std::string& filename)
 {
   lisp::Parser parser;
-  std::auto_ptr<lisp::Lisp> root;
+  const lisp::Lisp* root;
 
   try {
-    root.reset(parser.parse(filename));
+    root = parser.parse(filename);
   } catch(const std::exception& e) {
-       std::ostringstream msg;
-       msg << "Parse error when trying to load sprite '" << filename
-               << "': " << e.what() << "\n";
-       throw std::runtime_error(msg.str());
+    std::ostringstream msg;
+    msg << "Parse error when trying to load sprite '" << filename
+        << "': " << e.what() << "\n";
+    throw std::runtime_error(msg.str());
   }
 
   const lisp::Lisp* sprite = root->get_lisp("supertux-sprite");