mirror of
https://github.com/Auties00/Reboot-Launcher.git
synced 2026-01-13 19:22:22 +01:00
21 lines
432 B
C++
21 lines
432 B
C++
#pragma once
|
|
|
|
#include "UnrealTemplate.h"
|
|
|
|
/**
|
|
* Helper class to reverse a predicate.
|
|
* Performs Predicate(B, A)
|
|
*/
|
|
template <typename PredicateType>
|
|
class TReversePredicate
|
|
{
|
|
const PredicateType& Predicate;
|
|
|
|
public:
|
|
TReversePredicate(const PredicateType& InPredicate)
|
|
: Predicate(InPredicate)
|
|
{}
|
|
|
|
template <typename T>
|
|
FORCEINLINE bool operator()(T&& A, T&& B) const { return Predicate(Forward<T>(B), Forward<T>(A)); }
|
|
}; |