diff options
author | Loïc Blot <nerzhul@users.noreply.github.com> | 2017-04-20 00:12:52 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-20 00:12:52 +0200 |
commit | f98bbe193e0093aca8d8957cec82fdbd28639915 (patch) | |
tree | 19879fbca595d4e8cddfa8d7d069b7f78016a713 /src/map.h | |
parent | f3fe62a0bf9e775b3e6e838f104ab605a2238792 (diff) | |
download | minetest-f98bbe193e0093aca8d8957cec82fdbd28639915.tar.gz minetest-f98bbe193e0093aca8d8957cec82fdbd28639915.tar.bz2 minetest-f98bbe193e0093aca8d8957cec82fdbd28639915.zip |
Fix various copy instead of const ref reported by cppcheck (part 3) (#5616)
* Also remove 2 non declared but defined functions
* Make some functions around const ref changes const
Diffstat (limited to 'src/map.h')
-rw-r--r-- | src/map.h | 10 |
1 files changed, 2 insertions, 8 deletions
@@ -456,17 +456,11 @@ public: MapSector* loadSectorMeta(std::string dirname, bool save_after_load); bool loadSectorMeta(v2s16 p2d); - // Full load of a sector including all blocks. - // returns true on success, false on failure. - bool loadSectorFull(v2s16 p2d); - // If sector is not found in memory, try to load it from disk. - // Returns true if sector now resides in memory - //bool deFlushSector(v2s16 p2d); - bool saveBlock(MapBlock *block); static bool saveBlock(MapBlock *block, Database *db); // This will generate a sector with getSector if not found. - void loadBlock(std::string sectordir, std::string blockfile, MapSector *sector, bool save_after_load=false); + void loadBlock(const std::string §ordir, const std::string &blockfile, + MapSector *sector, bool save_after_load=false); MapBlock* loadBlock(v3s16 p); // Database version void loadBlock(std::string *blob, v3s16 p3d, MapSector *sector, bool save_after_load=false); |