added |nsWritingIterator<T>::write| to satisfy the char-source/char-sink stuff beard and I put in.

git-svn-id: svn://10.0.0.236/trunk@66632 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
scc%netscape.com
2000-04-21 01:19:40 +00:00
parent 917464a6a3
commit 75e584abac
3 changed files with 33 additions and 0 deletions

View File

@@ -179,6 +179,17 @@ class nsWritingIterator
return *this;
}
PRUint32
write( const value_type* s, PRUint32 n )
{
NS_ASSERTION(size_forward() > 0, "You can't |write| into an |nsWritingIterator| with no space!");
n = NS_MIN(n, PRUint32(size_forward()));
nsCharTraits<value_type>::copy(mPosition, s, n);
operator+=( difference_type(n) );
return n;
}
};

View File

@@ -179,6 +179,17 @@ class nsWritingIterator
return *this;
}
PRUint32
write( const value_type* s, PRUint32 n )
{
NS_ASSERTION(size_forward() > 0, "You can't |write| into an |nsWritingIterator| with no space!");
n = NS_MIN(n, PRUint32(size_forward()));
nsCharTraits<value_type>::copy(mPosition, s, n);
operator+=( difference_type(n) );
return n;
}
};

View File

@@ -179,6 +179,17 @@ class nsWritingIterator
return *this;
}
PRUint32
write( const value_type* s, PRUint32 n )
{
NS_ASSERTION(size_forward() > 0, "You can't |write| into an |nsWritingIterator| with no space!");
n = NS_MIN(n, PRUint32(size_forward()));
nsCharTraits<value_type>::copy(mPosition, s, n);
operator+=( difference_type(n) );
return n;
}
};