Skip to content

Commit

Permalink
fix: use std::ranges::find_if in Module.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
ThirdEyeSqueegee committed Oct 2, 2023
1 parent a6cfb24 commit 0e0ee58
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CommonLibSF/src/REL/Module.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ namespace REL

for (std::size_t i = 0; i < size; ++i) {
const auto& section = sections[i];
const auto it = std::find_if(SEGMENTS.begin(), SEGMENTS.end(), [&](auto&& a_elem) {
const auto it = std::ranges::find_if(SEGMENTS.begin(), SEGMENTS.end(), [&](auto&& a_elem) {
constexpr auto size = std::extent_v<decltype(section.name)>;
const auto len = (std::min)(a_elem.first.size(), size);
return std::memcmp(a_elem.first.data(), section.name, len) == 0 && (section.characteristics & a_elem.second) == a_elem.second;
Expand Down

0 comments on commit 0e0ee58

Please sign in to comment.