Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #12248 from Dentomologist/cheatsearch_use_std_comp…
…arison_functions

CheatSearch: Use std comparison function objects
  • Loading branch information
Tilka committed Oct 28, 2023
2 parents ce895f1 + c5a8a3f commit ef447bb
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Source/Core/Core/CheatSearch.cpp
Expand Up @@ -424,17 +424,17 @@ MakeCompareFunctionForLastValue(Cheats::CompareType op)
switch (op)
{
case Cheats::CompareType::Equal:
return [](const T& new_value, const T& old_value) { return new_value == old_value; };
return std::equal_to<T>();
case Cheats::CompareType::NotEqual:
return [](const T& new_value, const T& old_value) { return new_value != old_value; };
return std::not_equal_to<T>();
case Cheats::CompareType::Less:
return [](const T& new_value, const T& old_value) { return new_value < old_value; };
return std::less<T>();
case Cheats::CompareType::LessOrEqual:
return [](const T& new_value, const T& old_value) { return new_value <= old_value; };
return std::less_equal<T>();
case Cheats::CompareType::Greater:
return [](const T& new_value, const T& old_value) { return new_value > old_value; };
return std::greater<T>();
case Cheats::CompareType::GreaterOrEqual:
return [](const T& new_value, const T& old_value) { return new_value >= old_value; };
return std::greater_equal<T>();
default:
DEBUG_ASSERT(false);
return nullptr;
Expand Down

0 comments on commit ef447bb

Please sign in to comment.