diff --git a/src/windows-emulator/registry/registry_manager.cpp b/src/windows-emulator/registry/registry_manager.cpp index f09199df..ca3a21c3 100644 --- a/src/windows-emulator/registry/registry_manager.cpp +++ b/src/windows-emulator/registry/registry_manager.cpp @@ -114,7 +114,7 @@ std::optional registry_manager::get_key(const utils::path_key& key return {std::move(reg_key)}; } -std::optional registry_manager::get_value(const registry_key& key, std::string name) +std::optional registry_manager::get_value(const registry_key& key, const std::string& name) { const auto iterator = this->hives_.find(key.hive); if (iterator == this->hives_.end()) diff --git a/src/windows-emulator/registry/registry_manager.hpp b/src/windows-emulator/registry/registry_manager.hpp index cd62c7d7..db45e733 100644 --- a/src/windows-emulator/registry/registry_manager.hpp +++ b/src/windows-emulator/registry/registry_manager.hpp @@ -47,7 +47,7 @@ class registry_manager registry_manager& operator=(const registry_manager&) = delete; std::optional get_key(const utils::path_key& key); - std::optional get_value(const registry_key& key, std::string name); + std::optional get_value(const registry_key& key, const std::string& name); std::optional get_value(const registry_key& key, size_t index); std::optional get_sub_key_name(const registry_key& key, size_t index);