mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 14:51:51 +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;
|
||||
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue