]> git.lizzy.rs Git - minetest.git/blobdiff - src/filecache.h
map.cpp: Initialize NodeNeighbor, set NeighborType to u8 & cleanup
[minetest.git] / src / filecache.h
index a913a06ac3e60ed6e62578718478f54b7219bb80..96e4c8ba1b6c14a6f3d0ae8dad1304390755d01b 100644 (file)
@@ -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 <string>
 #include <iostream>
+#include <string>
 
 class FileCache
 {
@@ -30,18 +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 load(const std::string &name, 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