Bug 907728 - use function overloading instead of defaulted arguments for nsTSubstring::Assign; r=jlebar

This commit is contained in:
Nathan Froyd 2013-08-20 16:32:54 -04:00
parent 7e84fb44e4
commit 7e4027ab57
2 changed files with 9 additions and 2 deletions

View File

@ -342,8 +342,8 @@ class nsTSubstring_CharT
void NS_FASTCALL Assign( char_type c );
bool NS_FASTCALL Assign( char_type c, const fallible_t& ) NS_WARN_UNUSED_RESULT;
void NS_FASTCALL
Assign( const char_type* data, size_type length = size_type(-1) );
void NS_FASTCALL Assign( const char_type* data );
void NS_FASTCALL Assign( const char_type* data, size_type length );
bool NS_FASTCALL Assign( const char_type* data, size_type length, const fallible_t& ) NS_WARN_UNUSED_RESULT;
void NS_FASTCALL Assign( const self_type& );

View File

@ -285,6 +285,13 @@ nsTSubstring_CharT::Assign( char_type c, const fallible_t& )
return true;
}
void
nsTSubstring_CharT::Assign( const char_type* data )
{
if (!Assign(data, size_type(-1), fallible_t()))
NS_RUNTIMEABORT("OOM");
}
void
nsTSubstring_CharT::Assign( const char_type* data, size_type length )
{