added comparison operator for FBPUniqueNetID

added comparison operator for FBPUniqueNetID, so that STD functions will work with it.
This commit is contained in:
Joshua
2020-11-13 15:42:24 -05:00
parent 0cee743c63
commit e561b92679

View File

@@ -200,6 +200,17 @@ public:
return nullptr;
}
// Adding in a compare operator so that std functions will work with this struct
FORCEINLINE bool operator==(const FBPUniqueNetId& Other) const
{
return (IsValid() && Other.IsValid() && (*GetUniqueNetId() == *Other.GetUniqueNetId()));
}
FORCEINLINE bool operator!=(const FBPUniqueNetId& Other) const
{
return !(IsValid() && Other.IsValid() && (*GetUniqueNetId() == *Other.GetUniqueNetId()));
}
FBPUniqueNetId()
{
bUseDirectPointer = false;