/
redgpu
/
ezEngine
Обзор
Документация
Войти
/
redgpu
/
ezEngine
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
dev
Code/Engine/Foundation/Algorithm/Comparer.h
50 строк
1 KB
Jan Krassnigg
Fixes for including public ez headers (#1755)
04 янв 2026, 10:57
Не верифицирован
04 янв 2026, 10:57
5feb7ef
Код
Авторство
О чём код?
#pragma once #include <Foundation/Basics.h> /// \brief A comparer object is used in sorting algorithms to compare to objects of the same type. template <typename T> struct ezCompareHelper { /// \brief Returns true if a is less than b EZ_ALWAYS_INLINE bool Less(const T& a, const T& b) const { return a < b; } /// \brief Returns true if a is less than b template <typename U> EZ_ALWAYS_INLINE bool Less(const T& a, const U& b) const { return a < b; } /// \brief Returns true if a is less than b template <typename U> EZ_ALWAYS_INLINE bool Less(const U& a, const T& b) const { return a < b; } /// \brief Returns true if a is equal to b EZ_ALWAYS_INLINE bool Equal(const T& a, const T& b) const { return a == b; } /// \brief Returns true if a is equal to b template <typename U> EZ_ALWAYS_INLINE bool Equal(const T& a, const U& b) const { return a == b; } /// \brief Returns true if a is equal to b template <typename U> EZ_ALWAYS_INLINE bool Equal(const U& a, const T& b) const { return a == b; } }; // See <Foundation/Strings/String.h> for ezString specialization and case insensitive version.