mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-02-07 00:51:25 +00:00
- 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:
parent
4bae3f9976
commit
845bcdf14c
1 changed files with 10 additions and 0 deletions
|
@ -296,6 +296,16 @@ protected:
|
||||||
static FNullStringData NullString;
|
static FNullStringData NullString;
|
||||||
|
|
||||||
friend struct FStringData;
|
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
|
namespace StringFormat
|
||||||
|
|
Loading…
Reference in a new issue