Fixed two warnings and added a method with a shorter name because of bug in VC++ compiler

This commit is contained in:
mcmullen%netscape.com 1999-04-15 01:11:42 +00:00
Родитель 51bd621930
Коммит 8a002d9b23
2 изменённых файлов: 8 добавлений и 4 удалений

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

@ -242,7 +242,7 @@ public:
char& operator [](int i)
{
if (i >= (int)Length())
ReallocData(i + 1);
ReallocData((PRUint32)i + 1);
return mData->mString[i]; // caveat appelator
}
char& operator [](unsigned int i) { return (*this)[(int)i]; }
@ -360,7 +360,7 @@ class NS_BASE nsFileSpec
#endif
return mError;
}
PRBool Failed() const { return NS_FAILED(Error()); }
PRBool Failed() const { return (PRBool)NS_FAILED(Error()); }
friend NS_BASE nsOutputStream& operator << (
@ -452,6 +452,8 @@ class NS_BASE nsFileSpec
//--------------------------------------------------
void CreateDirectory(int mode = 0700 /* for unix */);
void CreateDir(int mode = 0700) { CreateDirectory(mode); }
// workaround for yet another VC++ bug with long identifiers.
void Delete(PRBool inRecursive) const;
nsresult Rename(const char* inNewName); // not const: gets updated

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

@ -242,7 +242,7 @@ public:
char& operator [](int i)
{
if (i >= (int)Length())
ReallocData(i + 1);
ReallocData((PRUint32)i + 1);
return mData->mString[i]; // caveat appelator
}
char& operator [](unsigned int i) { return (*this)[(int)i]; }
@ -360,7 +360,7 @@ class NS_BASE nsFileSpec
#endif
return mError;
}
PRBool Failed() const { return NS_FAILED(Error()); }
PRBool Failed() const { return (PRBool)NS_FAILED(Error()); }
friend NS_BASE nsOutputStream& operator << (
@ -452,6 +452,8 @@ class NS_BASE nsFileSpec
//--------------------------------------------------
void CreateDirectory(int mode = 0700 /* for unix */);
void CreateDir(int mode = 0700) { CreateDirectory(mode); }
// workaround for yet another VC++ bug with long identifiers.
void Delete(PRBool inRecursive) const;
nsresult Rename(const char* inNewName); // not const: gets updated