Plasma Engine  2.0
Loading...
Searching...
No Matches
Comparer.h
1
2#pragma once
3
5template <typename T>
7{
9 PL_ALWAYS_INLINE bool Less(const T& a, const T& b) const
10 {
11 return a < b;
12 }
13
15 template <typename U>
16 PL_ALWAYS_INLINE bool Less(const T& a, const U& b) const
17 {
18 return a < b;
19 }
20
22 template <typename U>
23 PL_ALWAYS_INLINE bool Less(const U& a, const T& b) const
24 {
25 return a < b;
26 }
27
29 PL_ALWAYS_INLINE bool Equal(const T& a, const T& b) const
30 {
31 return a == b;
32 }
33
35 template <typename U>
36 PL_ALWAYS_INLINE bool Equal(const T& a, const U& b) const
37 {
38 return a == b;
39 }
40
42 template <typename U>
43 PL_ALWAYS_INLINE bool Equal(const U& a, const T& b) const
44 {
45 return a == b;
46 }
47};
48
49// See <Foundation/Strings/String.h> for plString specialization and case insensitive version.
A comparer object is used in sorting algorithms to compare to objects of the same type.
Definition Comparer.h:7
PL_ALWAYS_INLINE bool Less(const U &a, const T &b) const
Returns true if a is less than b.
Definition Comparer.h:23
PL_ALWAYS_INLINE bool Equal(const T &a, const U &b) const
Returns true if a is equal to b.
Definition Comparer.h:36
PL_ALWAYS_INLINE bool Equal(const U &a, const T &b) const
Returns true if a is equal to b.
Definition Comparer.h:43
PL_ALWAYS_INLINE bool Less(const T &a, const U &b) const
Returns true if a is less than b.
Definition Comparer.h:16
PL_ALWAYS_INLINE bool Less(const T &a, const T &b) const
Returns true if a is less than b.
Definition Comparer.h:9
PL_ALWAYS_INLINE bool Equal(const T &a, const T &b) const
Returns true if a is equal to b.
Definition Comparer.h:29