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

This commit is contained in:
scc%netscape.com 2000-04-21 01:19:40 +00:00
Родитель 6e5f538968
Коммит d03cfe6e83
3 изменённых файлов: 33 добавлений и 0 удалений

Просмотреть файл

@ -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;
}
};

Просмотреть файл

@ -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;
}
};

Просмотреть файл

@ -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;
}
};