Fixed return strict const iterator, replace to range-based loop C++17 and code refactor (#548)

Signed-off-by: Herman Semenov <GermanAizek@yandex.ru>
Co-authored-by: georgemoralis <giorgosmrls@gmail.com>
This commit is contained in:
Herman Semenoff 2024-10-18 08:06:11 +00:00 committed by GitHub
parent 9814a1b788
commit 96ea686eb6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 31 additions and 32 deletions

View file

@ -43,11 +43,10 @@ struct RangeSet {
if (m_ranges_set.empty()) {
return;
}
auto it = m_ranges_set.begin();
auto end_it = m_ranges_set.end();
for (; it != end_it; it++) {
const VAddr inter_addr_end = it->upper();
const VAddr inter_addr = it->lower();
for (const auto& set : m_ranges_set) {
const VAddr inter_addr_end = set.upper();
const VAddr inter_addr = set.lower();
func(inter_addr, inter_addr_end);
}
}