зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
5b9b68d3fb
Коммит
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
|
||||
|
|
Загрузка…
Ссылка в новой задаче