Optimize parameter passing to avoid unnecessary copying
This commit is contained in:
@@ -128,7 +128,7 @@ public:
|
||||
bool generatorTestMode = false;
|
||||
bool doWriteLights = true;
|
||||
|
||||
WorldRegions(fs::path directory);
|
||||
WorldRegions(const fs::path &directory);
|
||||
WorldRegions(const WorldRegions&) = delete;
|
||||
~WorldRegions();
|
||||
|
||||
@@ -148,7 +148,7 @@ public:
|
||||
std::unique_ptr<light_t[]> getLights(int x, int z);
|
||||
chunk_inventories_map fetchInventories(int x, int z);
|
||||
|
||||
void processRegionVoxels(int x, int z, regionproc func);
|
||||
void processRegionVoxels(int x, int z, const regionproc& func);
|
||||
|
||||
fs::path getRegionsFolder(int layer) const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user