CheatSearch: Use std comparison function objects

This commit is contained in:
Dentomologist 2023-08-07 13:59:19 -07:00
parent 60e3b4c093
commit c5a8a3fd4a
1 changed files with 6 additions and 6 deletions

View File

@ -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;