зеркало из https://github.com/mozilla/pjs.git
added |nsWritingIterator<T>::write| to satisfy the char-source/char-sink stuff beard and I put in.
This commit is contained in:
Родитель
6e5f538968
Коммит
d03cfe6e83
|
@ -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;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче