Fix clang-tidy warning (attempt 2)

This commit is contained in:
Igor Pissolati
2025-04-20 17:08:54 -03:00
parent 5eba6d5e8d
commit 7dbf498ea9
2 changed files with 3 additions and 3 deletions

View File

@@ -40,8 +40,8 @@ namespace utils
bool operator()(const std::string_view lhs, const std::string_view rhs) const
{
return std::equal(lhs.begin(), lhs.end(), rhs.begin(), rhs.end(),
[](unsigned char c1, unsigned char c2) { return std::tolower(c1) == std::tolower(c2); });
return std::ranges::equal(
lhs, rhs, [](unsigned char c1, unsigned char c2) { return std::tolower(c1) == std::tolower(c2); });
}
};

View File

@@ -400,7 +400,7 @@ namespace syscalls
constexpr auto base_size = offsetof(KEY_VALUE_FULL_INFORMATION, Name);
const auto name_size = value_name_u16.size() * 2;
const auto data_size = value->data.size();
const ULONG data_offset = static_cast<ULONG>(base_size + name_size);
const auto data_offset = static_cast<ULONG>(base_size + name_size);
const auto required_size = data_offset + data_size;
result_length.write(static_cast<ULONG>(required_size));