TMap with struct

Sorry…did the GetTypeHash() as note…didn’t mean to be exact.



USTRUCT(BlueprintType)
struct xyz_API FImapSlice
{
public:
GENERATED_BODY()

FAWIntVector coords;

UPROPERTY()
TMap<uint8, UAWIMap*> ImapSlice;


/** Equality operators */
bool operator==(const FImapSlice& Other) const
{
return coords == Other.coords;
}
bool operator!=(const FImapSlice& Other) const
{
return !(*this == Other);
}

/** Implemented so it can be used in Maps/Sets */
friend inline uint32 GetTypeHash(const FImapSlice& Key)
{
uint32 Hash = 0;

Hash = HashCombine(Hash, GetTypeHash(Key.coords));
return Hash;
}
};


1 Like