bug #66278: r=danm, sr=alecf. Fix signed vs. unsigned warngins in |nsFragmentedString::SetLength|

This commit is contained in:
scc%mozilla.org 2001-02-06 23:00:39 +00:00
parent 97e399fbe6
commit 2345444093
3 changed files with 6 additions and 6 deletions

View File

@ -121,7 +121,7 @@ nsFragmentedString::SetLength( PRUint32 aNewLength )
// according to the current interpretation of |SetLength|,
// cut off characters from the end, or else add unitialized space to fill
if ( aNewLength < mBufferList.GetDataLength() )
if ( aNewLength < PRUint32(mBufferList.GetDataLength()) )
{
// if ( aNewLength )
mBufferList.DiscardSuffix(mBufferList.GetDataLength()-aNewLength);
@ -130,7 +130,7 @@ nsFragmentedString::SetLength( PRUint32 aNewLength )
}
// temporarily... eliminate as soon as our munging routines don't need this form of |SetLength|
else if ( aNewLength > mBufferList.GetDataLength() )
else if ( aNewLength > PRUint32(mBufferList.GetDataLength()) )
{
size_t empty_space_to_add = aNewLength - mBufferList.GetDataLength();
nsSharedBufferList::Buffer* new_buffer = nsSharedBufferList::NewSingleAllocationBuffer(0, 0, empty_space_to_add);

View File

@ -121,7 +121,7 @@ nsFragmentedString::SetLength( PRUint32 aNewLength )
// according to the current interpretation of |SetLength|,
// cut off characters from the end, or else add unitialized space to fill
if ( aNewLength < mBufferList.GetDataLength() )
if ( aNewLength < PRUint32(mBufferList.GetDataLength()) )
{
// if ( aNewLength )
mBufferList.DiscardSuffix(mBufferList.GetDataLength()-aNewLength);
@ -130,7 +130,7 @@ nsFragmentedString::SetLength( PRUint32 aNewLength )
}
// temporarily... eliminate as soon as our munging routines don't need this form of |SetLength|
else if ( aNewLength > mBufferList.GetDataLength() )
else if ( aNewLength > PRUint32(mBufferList.GetDataLength()) )
{
size_t empty_space_to_add = aNewLength - mBufferList.GetDataLength();
nsSharedBufferList::Buffer* new_buffer = nsSharedBufferList::NewSingleAllocationBuffer(0, 0, empty_space_to_add);

View File

@ -121,7 +121,7 @@ nsFragmentedString::SetLength( PRUint32 aNewLength )
// according to the current interpretation of |SetLength|,
// cut off characters from the end, or else add unitialized space to fill
if ( aNewLength < mBufferList.GetDataLength() )
if ( aNewLength < PRUint32(mBufferList.GetDataLength()) )
{
// if ( aNewLength )
mBufferList.DiscardSuffix(mBufferList.GetDataLength()-aNewLength);
@ -130,7 +130,7 @@ nsFragmentedString::SetLength( PRUint32 aNewLength )
}
// temporarily... eliminate as soon as our munging routines don't need this form of |SetLength|
else if ( aNewLength > mBufferList.GetDataLength() )
else if ( aNewLength > PRUint32(mBufferList.GetDataLength()) )
{
size_t empty_space_to_add = aNewLength - mBufferList.GetDataLength();
nsSharedBufferList::Buffer* new_buffer = nsSharedBufferList::NewSingleAllocationBuffer(0, 0, empty_space_to_add);