diff options
author | Loïc Blot <nerzhul@users.noreply.github.com> | 2017-04-19 00:36:30 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-19 00:36:30 +0200 |
commit | cf37a5569002e83cc4d6916b39118ceba134da1b (patch) | |
tree | 4de13e55c8f2b37fca85f4c9a4b15e52bc0f030a /src/map.h | |
parent | 5f2af7c4e80da1c646e5a19ceed5bd0871b56e85 (diff) | |
download | minetest-cf37a5569002e83cc4d6916b39118ceba134da1b.tar.gz minetest-cf37a5569002e83cc4d6916b39118ceba134da1b.tar.bz2 minetest-cf37a5569002e83cc4d6916b39118ceba134da1b.zip |
Fix various variables passed by copy instead of const ref (#5610)
Pointed by cppcheck
Diffstat (limited to 'src/map.h')
-rw-r--r-- | src/map.h | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -360,7 +360,7 @@ public: /* savedir: directory to which map data should be saved */ - ServerMap(std::string savedir, IGameDef *gamedef, EmergeManager *emerge); + ServerMap(const std::string &savedir, IGameDef *gamedef, EmergeManager *emerge); ~ServerMap(); s32 mapType() const @@ -422,16 +422,14 @@ public: // returns something like "map/sectors/xxxxxxxx" std::string getSectorDir(v2s16 pos, int layout = 2); // dirname: final directory name - v2s16 getSectorPos(std::string dirname); - v3s16 getBlockPos(std::string sectordir, std::string blockfile); + v2s16 getSectorPos(const std::string &dirname); + v3s16 getBlockPos(const std::string §ordir, const std::string &blockfile); static std::string getBlockFilename(v3s16 p); /* Database functions */ static Database *createDatabase(const std::string &name, const std::string &savedir, Settings &conf); - // Verify we can read/write to the database - void verifyDatabase(); // Returns true if the database file does not exist bool loadFromFolders(); |