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:
scc%netscape.com 1999-04-24 18:40:36 +00:00
Родитель 5b9b68d3fb
Коммит b7e35a36a2
2 изменённых файлов: 8 добавлений и 2 удалений

Просмотреть файл

@ -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