Small fixes

This commit is contained in:
momo5502
2025-05-25 16:23:00 +02:00
parent eb163474f9
commit ed9eb1dfc3
3 changed files with 5 additions and 6 deletions

View File

@@ -689,7 +689,7 @@ namespace
{
int executions = 0;
auto* apc_func = +[](ULONG_PTR param) {
auto* apc_func = +[](const ULONG_PTR param) {
*reinterpret_cast<int*>(param) += 1; //
};

View File

@@ -159,7 +159,7 @@ const hive_value* hive_key::get_value(std::ifstream& file, const std::string_vie
return &value;
}
const hive_value* hive_key::get_value(std::ifstream& file, size_t index)
const hive_value* hive_key::get_value(std::ifstream& file, const size_t index)
{
this->parse(file);

View File

@@ -4,7 +4,6 @@
#include <serialization_helper.hpp>
#include "hive_parser.hpp"
#include <utils/string.hpp>
namespace
{
@@ -153,7 +152,7 @@ std::optional<registry_key> registry_manager::get_key(const utils::path_key& key
return {std::move(reg_key)};
}
std::optional<registry_value> registry_manager::get_value(const registry_key& key, std::string_view name)
std::optional<registry_value> registry_manager::get_value(const registry_key& key, const std::string_view name)
{
const auto iterator = this->hives_.find(key.hive);
if (iterator == this->hives_.end())
@@ -175,7 +174,7 @@ std::optional<registry_value> registry_manager::get_value(const registry_key& ke
return v;
}
std::optional<registry_value> registry_manager::get_value(const registry_key& key, size_t index)
std::optional<registry_value> registry_manager::get_value(const registry_key& key, const size_t index)
{
const auto iterator = this->hives_.find(key.hive);
if (iterator == this->hives_.end())
@@ -210,7 +209,7 @@ registry_manager::hive_map::iterator registry_manager::find_hive(const utils::pa
return this->hives_.end();
}
std::optional<std::string_view> registry_manager::get_sub_key_name(const registry_key& key, size_t index)
std::optional<std::string_view> registry_manager::get_sub_key_name(const registry_key& key, const size_t index)
{
const auto iterator = this->hives_.find(key.hive);
if (iterator == this->hives_.end())