fix build on linux and void unnecessary copying

This commit is contained in:
Skarn
2021-12-25 18:34:28 +03:00
parent b0b0392187
commit 595a4c2fcd
2 changed files with 5 additions and 3 deletions

View File

@@ -8,6 +8,7 @@
#include <stdexcept>
#include <cstring>
#include <algorithm>
#include <memory>
#include <blizzard-archive-library/include/ClientData.hpp>
class DBCFile

View File

@@ -58,7 +58,7 @@ namespace Noggit::Project
public:
ApplicationProjectReader() = default;
NoggitProject ReadProject(std::filesystem::path projectPath)
NoggitProject ReadProject(std::filesystem::path const& projectPath)
{
for (const auto& entry : std::filesystem::directory_iterator(projectPath))
{
@@ -123,7 +123,8 @@ namespace Noggit::Project
_configuration = configuration;
}
void CreateProject(std::filesystem::path projectPath, std::filesystem::path clientPath, std::string clientVersion, std::string projectName)
void CreateProject(std::filesystem::path const& projectPath, std::filesystem::path const& clientPath,
std::string const& clientVersion, std::string const& projectName)
{
std::filesystem::create_directory(projectPath);
@@ -239,7 +240,7 @@ namespace Noggit::Project
}
}
std::shared_ptr<NoggitProject> LoadProject(std::filesystem::path projectPath)
std::shared_ptr<NoggitProject> LoadProject(std::filesystem::path const& projectPath)
{
auto projectReader = ApplicationProjectReader();
auto project = projectReader.ReadProject(projectPath);