- Attempt to disable all comparison operators on FString since unless we decide otherwise, it's a programming error to use them (caused implicit conversion to const char* and then the built in comparision was called).

This commit is contained in:
Braden Obrzut 2015-01-16 19:13:51 -05:00
parent 4bae3f9976
commit 845bcdf14c

View file

@ -296,6 +296,16 @@ protected:
static FNullStringData NullString;
friend struct FStringData;
private:
// Prevent these from being called as current practices are to use Compare.
// Without this FStrings will be accidentally compared against char* ptrs.
bool operator == (const FString &illegal) const;
bool operator != (const FString &illegal) const;
bool operator < (const FString &illegal) const;
bool operator > (const FString &illegal) const;
bool operator <= (const FString &illegal) const;
bool operator >= (const FString &illegal) const;
};
namespace StringFormat