X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Ffilecache.h;h=96e4c8ba1b6c14a6f3d0ae8dad1304390755d01b;hb=359c8f82ceaef19563d0dba67a090e8fdc2dfb71;hp=cf59a8e5b30aba304f2c50a4d4f13b0c96262daf;hpb=22e186b4aa88b585e71500c4e9a03bf69b0b6191;p=minetest.git diff --git a/src/filecache.h b/src/filecache.h index cf59a8e5b..96e4c8ba1 100644 --- a/src/filecache.h +++ b/src/filecache.h @@ -18,11 +18,10 @@ with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#ifndef FILECACHE_HEADER -#define FILECACHE_HEADER +#pragma once -#include #include +#include class FileCache { @@ -30,20 +29,14 @@ class FileCache /* 'dir' is the file cache directory to use. */ - FileCache(std::string dir): - m_dir(dir) - { - } - + FileCache(const std::string &dir) : m_dir(dir) {} + bool update(const std::string &name, const std::string &data); - bool update_sha1(const std::string &data); bool load(const std::string &name, std::ostream &os); - bool load_sha1(const std::string &sha1_raw, std::ostream &os); + private: std::string m_dir; bool loadByPath(const std::string &path, std::ostream &os); bool updateByPath(const std::string &path, const std::string &data); }; - -#endif