X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fphysfs%2Fphysfs_file_system.cpp;h=65ac0677befeec4f9ef75e3d147b1ceb99613854;hb=c0b5cfa3eadebef8101f87cd593eb221bdef9280;hp=1575da0d420dbab1f4c80ee7a412bab23f6097c9;hpb=2385af9640c78d45fc28123364c4f46810edbef5;p=supertux.git diff --git a/src/physfs/physfs_file_system.cpp b/src/physfs/physfs_file_system.cpp index 1575da0d4..65ac0677b 100644 --- a/src/physfs/physfs_file_system.cpp +++ b/src/physfs/physfs_file_system.cpp @@ -1,5 +1,5 @@ // SuperTux -// Copyright (C) 2009 Ingo Ruhnke +// Copyright (C) 2009 Ingo Ruhnke // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -16,7 +16,7 @@ #include "physfs/physfs_file_system.hpp" -#include "physfs/ifile_stream.hpp" +#include "physfs/buffered_ifile_stream.hpp" PhysFSFileSystem::PhysFSFileSystem() { @@ -37,10 +37,11 @@ PhysFSFileSystem::open_directory(const std::string& pathname) return files; } -std::auto_ptr +std::unique_ptr PhysFSFileSystem::open_file(const std::string& filename) { - return std::auto_ptr(new IFileStream(filename)); + BufferedIFileStream* stream = new BufferedIFileStream(filename); + return std::unique_ptr(stream->get_stream()); } /* EOF */