Bug 835470. Add operator== for char_type. r=bsmedberg
authorJeff Muizelaar <jmuizelaar@mozilla.com>
Tue, 29 Jan 2013 14:51:46 -0500
changeset 120259 31d8ab3ddf1a2c61a993ddf4ebcdf5fc5e8d0659
parent 120258 abba5495035465c99f0cdb2518124238e6415f15
child 120260 5c248ef0fe629c97d4321ba1e61c55cc8788a96d
push id24243
push userryanvm@gmail.com
push dateWed, 30 Jan 2013 00:49:21 +0000
treeherdermozilla-central@5c248ef0fe62 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbsmedberg
bugs835470
milestone21.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 835470. Add operator== for char_type. r=bsmedberg Just a matter of hooking it up to Equals(). QString, std::string, WTFString all have these.
xpcom/string/public/nsTSubstring.h
--- a/xpcom/string/public/nsTSubstring.h
+++ b/xpcom/string/public/nsTSubstring.h
@@ -861,16 +861,23 @@ bool operator<=( const nsTSubstring_Char
 
 inline
 bool operator==( const nsTSubstring_CharT::base_string_type& lhs, const nsTSubstring_CharT::base_string_type& rhs )
   {
     return lhs.Equals(rhs);
   }
 
 inline
+bool operator==( const nsTSubstring_CharT::base_string_type& lhs, const nsTSubstring_CharT::char_type* rhs )
+  {
+    return lhs.Equals(rhs);
+  }
+
+
+inline
 bool operator>=( const nsTSubstring_CharT::base_string_type& lhs, const nsTSubstring_CharT::base_string_type& rhs )
   {
     return Compare(lhs, rhs)>=0;
   }
 
 inline
 bool operator> ( const nsTSubstring_CharT::base_string_type& lhs, const nsTSubstring_CharT::base_string_type& rhs )
   {