mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-14 02:31:59 +00:00
removed the non-|const| version of |nsAutoCString::operator const char*| since the const version serves in both |const| and non-|const| situations, and will be ambiguous to many compilers.
This commit is contained in:
parent
5b9b68d3fb
commit
b7e35a36a2
@ -201,7 +201,10 @@ public:
|
||||
NS_EXPLICIT nsAutoCString(const nsString& other) : mCString(other.ToNewCString()) {}
|
||||
virtual ~nsAutoCString();
|
||||
operator const char*() const { return mCString; }
|
||||
operator const char*() { return mCString; }
|
||||
|
||||
// operator const char*() { return mCString; }
|
||||
// don't need this, since |operator const char*() const| can
|
||||
// serve for both |const| and non-|const| callers
|
||||
protected:
|
||||
const char* mCString;
|
||||
}; // class nsAutoCString
|
||||
|
@ -201,7 +201,10 @@ public:
|
||||
NS_EXPLICIT nsAutoCString(const nsString& other) : mCString(other.ToNewCString()) {}
|
||||
virtual ~nsAutoCString();
|
||||
operator const char*() const { return mCString; }
|
||||
operator const char*() { return mCString; }
|
||||
|
||||
// operator const char*() { return mCString; }
|
||||
// don't need this, since |operator const char*() const| can
|
||||
// serve for both |const| and non-|const| callers
|
||||
protected:
|
||||
const char* mCString;
|
||||
}; // class nsAutoCString
|
||||
|
Loading…
Reference in New Issue
Block a user