We'll want support for IsVoid and SetIsVoid on nsACString too. r=jst,dbaron, rs=scc.

This commit is contained in:
jaggernaut%netscape.com 2001-10-10 07:51:16 +00:00
parent dc31b7e710
commit 787bb78541
4 changed files with 52 additions and 28 deletions

View File

@ -312,6 +312,8 @@ class NS_COM nsACString
inline PRBool Equals( const self_type& ) const;
PRBool Equals( const char_type* ) const;
virtual PRBool IsVoid() const;
virtual void SetIsVoid( PRBool );
/**
* |CharAt|, |operator[]|, |First()|, and |Last()| are not guaranteed to be constant-time operations.

View File

@ -27,18 +27,6 @@
#include "nsCRT.h"
PRBool
nsAString::IsVoid() const
{
return PR_FALSE;
}
void
nsAString::SetIsVoid( PRBool )
{
// |SetIsVoid| is ignored by default
}
int
nsDefaultStringComparator::operator()( const PRUnichar* lhs, const PRUnichar* rhs, PRUint32 aLength ) const
{
@ -97,14 +85,24 @@ Compare( const nsAString& lhs, const nsAString& rhs, const nsStringComparator& a
return 0;
}
PRBool
nsAString::IsVoid() const
{
return PR_FALSE;
}
void
nsAString::SetIsVoid( PRBool )
{
// |SetIsVoid| is ignored by default
}
PRBool
nsAString::Equals( const char_type* rhs ) const
{
return Equals(nsDependentString(rhs));
}
nsAString::char_type
nsAString::First() const
{
@ -562,6 +560,18 @@ Compare( const nsACString& lhs, const nsACString& rhs, const nsCStringComparator
return 0;
}
PRBool
nsACString::IsVoid() const
{
return PR_FALSE;
}
void
nsACString::SetIsVoid( PRBool )
{
// |SetIsVoid| is ignored by default
}
PRBool
nsACString::Equals( const char_type* rhs ) const
{

View File

@ -312,6 +312,8 @@ class NS_COM nsACString
inline PRBool Equals( const self_type& ) const;
PRBool Equals( const char_type* ) const;
virtual PRBool IsVoid() const;
virtual void SetIsVoid( PRBool );
/**
* |CharAt|, |operator[]|, |First()|, and |Last()| are not guaranteed to be constant-time operations.

View File

@ -27,18 +27,6 @@
#include "nsCRT.h"
PRBool
nsAString::IsVoid() const
{
return PR_FALSE;
}
void
nsAString::SetIsVoid( PRBool )
{
// |SetIsVoid| is ignored by default
}
int
nsDefaultStringComparator::operator()( const PRUnichar* lhs, const PRUnichar* rhs, PRUint32 aLength ) const
{
@ -97,14 +85,24 @@ Compare( const nsAString& lhs, const nsAString& rhs, const nsStringComparator& a
return 0;
}
PRBool
nsAString::IsVoid() const
{
return PR_FALSE;
}
void
nsAString::SetIsVoid( PRBool )
{
// |SetIsVoid| is ignored by default
}
PRBool
nsAString::Equals( const char_type* rhs ) const
{
return Equals(nsDependentString(rhs));
}
nsAString::char_type
nsAString::First() const
{
@ -562,6 +560,18 @@ Compare( const nsACString& lhs, const nsACString& rhs, const nsCStringComparator
return 0;
}
PRBool
nsACString::IsVoid() const
{
return PR_FALSE;
}
void
nsACString::SetIsVoid( PRBool )
{
// |SetIsVoid| is ignored by default
}
PRBool
nsACString::Equals( const char_type* rhs ) const
{