mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 03:15:11 +00:00
Bug 769533 - Part 2. get rid of AppendWithConversion. r=jlebar
This commit is contained in:
parent
1e533fbd2e
commit
b1f0381abe
@ -350,9 +350,6 @@ class nsTString_CharT : public nsTSubstring_CharT
|
||||
void AssignWithConversion( const nsTAString_IncompatibleCharT& aString );
|
||||
void AssignWithConversion( const incompatible_char_type* aData, PRInt32 aLength=-1 );
|
||||
|
||||
void AppendWithConversion( const nsTAString_IncompatibleCharT& aString );
|
||||
void AppendWithConversion( const incompatible_char_type* aData, PRInt32 aLength=-1 );
|
||||
|
||||
#endif // !MOZ_STRING_WITH_OBSOLETE_API
|
||||
|
||||
|
||||
|
@ -1029,21 +1029,4 @@ nsString::AssignWithConversion( const nsACString& aData )
|
||||
CopyASCIItoUTF16(aData, *this);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* nsTString::AppendWithConversion
|
||||
*/
|
||||
|
||||
void
|
||||
nsCString::AppendWithConversion( const nsAString& aData )
|
||||
{
|
||||
LossyAppendUTF16toASCII(aData, *this);
|
||||
}
|
||||
|
||||
void
|
||||
nsString::AppendWithConversion( const nsACString& aData )
|
||||
{
|
||||
AppendASCIItoUTF16(aData, *this);
|
||||
}
|
||||
|
||||
#endif // !MOZ_STRING_WITH_OBSOLETE_API
|
||||
|
@ -455,22 +455,3 @@ nsTString_CharT::AssignWithConversion( const incompatible_char_type* aData, PRIn
|
||||
AssignWithConversion(Substring(aData, aLength));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* nsTString::AppendWithConversion
|
||||
*/
|
||||
|
||||
void
|
||||
nsTString_CharT::AppendWithConversion( const incompatible_char_type* aData, PRInt32 aLength )
|
||||
{
|
||||
// for compatibility with the old string implementation, we need to allow
|
||||
// for a NULL input buffer :-(
|
||||
if (aData)
|
||||
{
|
||||
if (aLength < 0)
|
||||
aLength = nsCharTraits<incompatible_char_type>::length(aData);
|
||||
|
||||
AppendWithConversion(Substring(aData, aLength));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user