Bug 769533 - Part 2. get rid of AppendWithConversion. r=jlebar
authorMakoto Kato <m_kato@ga2.so-net.ne.jp>
Fri, 06 Jul 2012 18:44:20 +0900
changeset 98503 5a96f6193e75f6433d8c445d18af82d58046a086
parent 98502 3c3fc27e97468a017912b714824c790e6aea9846
child 98504 b3d4127dd8cefb1405cbc295aebda05c343ac850
child 98530 a8f682801a6d7c2bd2a65562f1b217e332caa1bb
push id11508
push userm_kato@ga2.so-net.ne.jp
push dateFri, 06 Jul 2012 09:45:16 +0000
treeherdermozilla-inbound@5a96f6193e75 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjlebar
bugs769533
milestone16.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 769533 - Part 2. get rid of AppendWithConversion. r=jlebar
xpcom/string/public/nsTString.h
xpcom/string/src/nsStringObsolete.cpp
xpcom/string/src/nsTStringObsolete.cpp
--- a/xpcom/string/public/nsTString.h
+++ b/xpcom/string/public/nsTString.h
@@ -345,19 +345,16 @@ class nsTString_CharT : public nsTSubstr
 
         /**
          * assign/append/insert with _LOSSY_ conversion
          */
 
       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
 
 
     protected:
 
       explicit
       nsTString_CharT( PRUint32 flags )
         : substring_type(flags) {}
--- a/xpcom/string/src/nsStringObsolete.cpp
+++ b/xpcom/string/src/nsStringObsolete.cpp
@@ -1024,26 +1024,9 @@ nsCString::AssignWithConversion( const n
   }
 
 void
 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
--- a/xpcom/string/src/nsTStringObsolete.cpp
+++ b/xpcom/string/src/nsTStringObsolete.cpp
@@ -450,27 +450,8 @@ nsTString_CharT::AssignWithConversion( c
     else
       {
         if (aLength < 0)
           aLength = nsCharTraits<incompatible_char_type>::length(aData);
 
         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));
-      }
-  }