X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fworld.cpp;h=df762ad3e8cec2de2668583c841268ee24bf1515;hb=c75799590ba936c673bea467b65518c3c2c2e284;hp=121718e342573211b2a6bda916ccba6f6bbdd6b3;hpb=a113d3bd1feddd510e3b2852b0d42522735eee40;p=supertux.git diff --git a/src/world.cpp b/src/world.cpp index 121718e34..df762ad3e 100644 --- a/src/world.cpp +++ b/src/world.cpp @@ -86,7 +86,7 @@ World::load(const std::string& filename) basedir = FileSystem::dirname(filename); lisp::Parser parser; - std::auto_ptr root (parser.parse(filename)); + const lisp::Lisp* root = parser.parse(filename); const lisp::Lisp* info = root->get_lisp("supertux-world"); if(info == NULL) @@ -106,7 +106,7 @@ World::load(const std::string& filename) // Level info file doesn't define any levels, so read the // directory to see what we can find - std::string path = basedir + "/"; + std::string path = basedir; char** files = PHYSFS_enumerateFiles(path.c_str()); if(!files) { log_warning << "Couldn't read subset dir '" << path << "'" << std::endl; @@ -128,7 +128,7 @@ World::run() current_ = this; - // create new squirrel table for persisten game state + // create new squirrel table for persistent game state HSQUIRRELVM vm = Scripting::global_vm; sq_pushroottable(vm); @@ -147,7 +147,7 @@ World::run() sq_release(global_vm, &world_thread); world_thread = create_thread(global_vm); compile_and_run(object_to_vm(world_thread), in, filename); - } catch(std::exception& e) { + } catch(std::exception& ) { // fallback: try to load worldmap worldmap.stwm using namespace WorldMapNS; main_loop->push_screen(new WorldMap(basedir + "worldmap.stwm")); @@ -198,7 +198,7 @@ World::load_state() try { lisp::Parser parser; - std::auto_ptr root (parser.parse(savegame_filename)); + const lisp::Lisp* root = parser.parse(savegame_filename); const lisp::Lisp* lisp = root->get_lisp("supertux-savegame"); if(lisp == NULL)