added const

This commit is contained in:
Jorijn van der Graaf 2024-12-30 20:18:23 +01:00
commit 9d4dca4fc1
2 changed files with 2 additions and 2 deletions

View file

@ -28,7 +28,7 @@ Configuration::Configuration(std::string name, std::string standard, std::vector
} }
Configuration::Configuration(nlohmann::json& configs, nlohmann::json& config, fs::path workingDir) { Configuration::Configuration(const nlohmann::json& configs, const nlohmann::json& config, fs::path workingDir) {
name = config["name"].get<std::string>(); name = config["name"].get<std::string>();
for (auto& [key, val] : config.items()) for (auto& [key, val] : config.items())
{ {

View file

@ -43,6 +43,6 @@ export namespace Crafter::Build {
std::vector<Dependency> dependencies; std::vector<Dependency> dependencies;
std::unordered_map<std::string, nlohmann::json> additionalProperties; std::unordered_map<std::string, nlohmann::json> additionalProperties;
Configuration(std::string name, std::string standard, std::vector<fs::path> sourceFiles, std::vector<fs::path> moduleFiles, std::string optimizationLevel, std::string buildDir, std::string outputDir, std::string type, std::string target, std::vector<Dependency> dependencies); Configuration(std::string name, std::string standard, std::vector<fs::path> sourceFiles, std::vector<fs::path> moduleFiles, std::string optimizationLevel, std::string buildDir, std::string outputDir, std::string type, std::string target, std::vector<Dependency> dependencies);
Configuration(nlohmann::json& configs, nlohmann::json& config, fs::path workingDir); Configuration(const nlohmann::json& configs, const nlohmann::json& config, fs::path workingDir);
}; };
} }