summaryrefslogtreecommitdiff
path: root/src/map.h
diff options
context:
space:
mode:
authorLoïc Blot <nerzhul@users.noreply.github.com>2017-04-19 00:36:30 +0200
committerGitHub <noreply@github.com>2017-04-19 00:36:30 +0200
commitcf37a5569002e83cc4d6916b39118ceba134da1b (patch)
tree4de13e55c8f2b37fca85f4c9a4b15e52bc0f030a /src/map.h
parent5f2af7c4e80da1c646e5a19ceed5bd0871b56e85 (diff)
downloadminetest-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.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/map.h b/src/map.h
index ea8dc76d1..90f97db8b 100644
--- a/src/map.h
+++ b/src/map.h
@@ -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 &sectordir, 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();