mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-08 20:41:49 +00:00
Optimize parameter passing to avoid unnecessary copying
This commit is contained in:
parent
46ca1bb04a
commit
f25a425cb9
123 changed files with 578 additions and 522 deletions
|
|
@ -32,17 +32,17 @@ class WorldConverter : public Task {
|
|||
runnable onComplete;
|
||||
uint tasksDone = 0;
|
||||
|
||||
void convertPlayer(fs::path file) const;
|
||||
void convertRegion(fs::path file) const;
|
||||
void convertPlayer(const fs::path& file) const;
|
||||
void convertRegion(const fs::path& file) const;
|
||||
public:
|
||||
WorldConverter(
|
||||
fs::path folder,
|
||||
const fs::path& folder,
|
||||
const Content* content,
|
||||
std::shared_ptr<ContentLUT> lut
|
||||
);
|
||||
~WorldConverter();
|
||||
|
||||
void convert(convert_task task) const;
|
||||
void convert(const convert_task& task) const;
|
||||
void convertNext();
|
||||
void setOnComplete(runnable callback);
|
||||
void write();
|
||||
|
|
@ -55,10 +55,10 @@ public:
|
|||
uint getWorkDone() const override;
|
||||
|
||||
static std::shared_ptr<Task> startTask(
|
||||
fs::path folder,
|
||||
const fs::path& folder,
|
||||
const Content* content,
|
||||
std::shared_ptr<ContentLUT> lut,
|
||||
runnable onDone,
|
||||
const std::shared_ptr<ContentLUT>& lut,
|
||||
const runnable& onDone,
|
||||
bool multithreading
|
||||
);
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue