mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 08:35:20 +02:00
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
This commit is contained in:
@@ -2347,16 +2347,15 @@ bool ServerMap::saveBlock(MapBlock *block, Database *db)
|
||||
return ret;
|
||||
}
|
||||
|
||||
void ServerMap::loadBlock(std::string sectordir, std::string blockfile,
|
||||
void ServerMap::loadBlock(const std::string §ordir, const std::string &blockfile,
|
||||
MapSector *sector, bool save_after_load)
|
||||
{
|
||||
DSTACK(FUNCTION_NAME);
|
||||
|
||||
std::string fullpath = sectordir + DIR_DELIM + blockfile;
|
||||
try {
|
||||
|
||||
std::ifstream is(fullpath.c_str(), std::ios_base::binary);
|
||||
if(is.good() == false)
|
||||
if (!is.good())
|
||||
throw FileNotGoodException("Cannot open block file");
|
||||
|
||||
v3s16 p3d = getBlockPos(sectordir, blockfile);
|
||||
|
Reference in New Issue
Block a user