fix 29333 make the initial construction passing "" for performance and legal nsString usage. r=rickg a=bobj

This commit is contained in:
ftang%netscape.com 2000-02-29 06:59:55 +00:00
parent 982af48162
commit 485fcaf806
3 changed files with 3 additions and 3 deletions

View File

@ -682,7 +682,7 @@ char* nsString::ToNewCString() const {
* http://www.cis.ohio-state.edu/htbin/rfc/rfc2279.html
*/
char* nsString::ToNewUTF8String() const {
nsCString temp(*this);
nsCString temp("");
temp.SetCapacity(8); //ensure that we get an allocated buffer instead of the common empty one.
// Caculate how many bytes we need

View File

@ -682,7 +682,7 @@ char* nsString::ToNewCString() const {
* http://www.cis.ohio-state.edu/htbin/rfc/rfc2279.html
*/
char* nsString::ToNewUTF8String() const {
nsCString temp(*this);
nsCString temp("");
temp.SetCapacity(8); //ensure that we get an allocated buffer instead of the common empty one.
// Caculate how many bytes we need

View File

@ -682,7 +682,7 @@ char* nsString::ToNewCString() const {
* http://www.cis.ohio-state.edu/htbin/rfc/rfc2279.html
*/
char* nsString::ToNewUTF8String() const {
nsCString temp(*this);
nsCString temp("");
temp.SetCapacity(8); //ensure that we get an allocated buffer instead of the common empty one.
// Caculate how many bytes we need