mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 14:22:01 +00:00
Remove dead code from obsolete string classes: ToNewString(), IsUnicode() and GetBuffer(). r=dbaron, rs=scc
This commit is contained in:
parent
a355418983
commit
4e91454ef0
@ -524,15 +524,6 @@ nsCString::CompressWhitespace( PRBool aEliminateLeading,PRBool aEliminateTrailin
|
||||
string conversion methods...
|
||||
*********************************************************************/
|
||||
|
||||
/**
|
||||
* Creates a duplicate clone (ptr) of this string.
|
||||
* @update gess 01/04/99
|
||||
* @return ptr to clone of this string
|
||||
*/
|
||||
nsCString* nsCString::ToNewString() const {
|
||||
return new nsCString(*this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Copies contents of this string into he given buffer
|
||||
* Note that if you provide me a buffer that is smaller than the length of
|
||||
|
@ -253,12 +253,6 @@ public:
|
||||
operator const char*() const {return (const char*)mStr;}
|
||||
//#endif
|
||||
|
||||
/**
|
||||
* This method constructs a new nsCString that is a clone
|
||||
* of this string.
|
||||
*
|
||||
*/
|
||||
nsCString* ToNewString() const;
|
||||
|
||||
/**
|
||||
* Copies data from internal buffer onto given char* buffer
|
||||
|
@ -201,18 +201,6 @@ nsString::SetCapacity( PRUint32 aNewCapacity )
|
||||
*********************************************************************/
|
||||
|
||||
|
||||
//static char gChar=0;
|
||||
/**
|
||||
*
|
||||
* @update gess1/4/99
|
||||
* @return ptr to internal buffer (if 1-byte), otherwise NULL
|
||||
*/
|
||||
const char* nsString::GetBuffer(void) const {
|
||||
const char* result=(eOneByte==mCharSize) ? mStr : 0;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* This method returns the internal unicode buffer.
|
||||
* Now that we've factored the string class, this should never
|
||||
@ -553,15 +541,6 @@ nsString::CompressWhitespace( PRBool aEliminateLeading,PRBool aEliminateTrailing
|
||||
string conversion methods...
|
||||
*********************************************************************/
|
||||
|
||||
/**
|
||||
* Creates a duplicate clone (ptr) of this string.
|
||||
* @update gess 01/04/99
|
||||
* @return ptr to clone of this string
|
||||
*/
|
||||
nsString* nsString::ToNewString() const {
|
||||
return new nsString(*this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Copies contents of this string into he given buffer
|
||||
* Note that if you provide me a buffer that is smaller than the length of
|
||||
|
@ -143,26 +143,10 @@ public:
|
||||
void SetCapacity(PRUint32 aLength);
|
||||
|
||||
|
||||
/**
|
||||
* Determine whether or not the characters in this
|
||||
* string are in store as 1 or 2 byte (unicode) strings.
|
||||
*
|
||||
* @return TRUE if ordered.
|
||||
*/
|
||||
PRBool IsUnicode(void) const {
|
||||
PRBool result=PRBool(mCharSize==eTwoByte);
|
||||
return result;
|
||||
}
|
||||
|
||||
/**********************************************************************
|
||||
Getters/Setters...
|
||||
*********************************************************************/
|
||||
|
||||
/**
|
||||
* Retrieve const ptr to internal buffer; DO NOT TRY TO FREE IT!
|
||||
*/
|
||||
const char* GetBuffer(void) const;
|
||||
|
||||
/**
|
||||
* Set nth character.
|
||||
*/
|
||||
@ -274,12 +258,6 @@ public:
|
||||
string conversion methods...
|
||||
*********************************************************************/
|
||||
|
||||
/**
|
||||
* This method constructs a new nsString is a clone of this string.
|
||||
*
|
||||
*/
|
||||
nsString* ToNewString() const;
|
||||
|
||||
/**
|
||||
* Copies data from internal buffer onto given char* buffer
|
||||
* NOTE: This only copies as many chars as will fit in given buffer (clips)
|
||||
|
@ -524,15 +524,6 @@ nsCString::CompressWhitespace( PRBool aEliminateLeading,PRBool aEliminateTrailin
|
||||
string conversion methods...
|
||||
*********************************************************************/
|
||||
|
||||
/**
|
||||
* Creates a duplicate clone (ptr) of this string.
|
||||
* @update gess 01/04/99
|
||||
* @return ptr to clone of this string
|
||||
*/
|
||||
nsCString* nsCString::ToNewString() const {
|
||||
return new nsCString(*this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Copies contents of this string into he given buffer
|
||||
* Note that if you provide me a buffer that is smaller than the length of
|
||||
|
@ -253,12 +253,6 @@ public:
|
||||
operator const char*() const {return (const char*)mStr;}
|
||||
//#endif
|
||||
|
||||
/**
|
||||
* This method constructs a new nsCString that is a clone
|
||||
* of this string.
|
||||
*
|
||||
*/
|
||||
nsCString* ToNewString() const;
|
||||
|
||||
/**
|
||||
* Copies data from internal buffer onto given char* buffer
|
||||
|
@ -201,18 +201,6 @@ nsString::SetCapacity( PRUint32 aNewCapacity )
|
||||
*********************************************************************/
|
||||
|
||||
|
||||
//static char gChar=0;
|
||||
/**
|
||||
*
|
||||
* @update gess1/4/99
|
||||
* @return ptr to internal buffer (if 1-byte), otherwise NULL
|
||||
*/
|
||||
const char* nsString::GetBuffer(void) const {
|
||||
const char* result=(eOneByte==mCharSize) ? mStr : 0;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* This method returns the internal unicode buffer.
|
||||
* Now that we've factored the string class, this should never
|
||||
@ -553,15 +541,6 @@ nsString::CompressWhitespace( PRBool aEliminateLeading,PRBool aEliminateTrailing
|
||||
string conversion methods...
|
||||
*********************************************************************/
|
||||
|
||||
/**
|
||||
* Creates a duplicate clone (ptr) of this string.
|
||||
* @update gess 01/04/99
|
||||
* @return ptr to clone of this string
|
||||
*/
|
||||
nsString* nsString::ToNewString() const {
|
||||
return new nsString(*this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Copies contents of this string into he given buffer
|
||||
* Note that if you provide me a buffer that is smaller than the length of
|
||||
|
@ -143,26 +143,10 @@ public:
|
||||
void SetCapacity(PRUint32 aLength);
|
||||
|
||||
|
||||
/**
|
||||
* Determine whether or not the characters in this
|
||||
* string are in store as 1 or 2 byte (unicode) strings.
|
||||
*
|
||||
* @return TRUE if ordered.
|
||||
*/
|
||||
PRBool IsUnicode(void) const {
|
||||
PRBool result=PRBool(mCharSize==eTwoByte);
|
||||
return result;
|
||||
}
|
||||
|
||||
/**********************************************************************
|
||||
Getters/Setters...
|
||||
*********************************************************************/
|
||||
|
||||
/**
|
||||
* Retrieve const ptr to internal buffer; DO NOT TRY TO FREE IT!
|
||||
*/
|
||||
const char* GetBuffer(void) const;
|
||||
|
||||
/**
|
||||
* Set nth character.
|
||||
*/
|
||||
@ -274,12 +258,6 @@ public:
|
||||
string conversion methods...
|
||||
*********************************************************************/
|
||||
|
||||
/**
|
||||
* This method constructs a new nsString is a clone of this string.
|
||||
*
|
||||
*/
|
||||
nsString* ToNewString() const;
|
||||
|
||||
/**
|
||||
* Copies data from internal buffer onto given char* buffer
|
||||
* NOTE: This only copies as many chars as will fit in given buffer (clips)
|
||||
|
Loading…
Reference in New Issue
Block a user