summaryrefslogtreecommitdiff
path: root/indra/llmessage/llbuffer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llmessage/llbuffer.cpp')
-rw-r--r--indra/llmessage/llbuffer.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/indra/llmessage/llbuffer.cpp b/indra/llmessage/llbuffer.cpp
index dc7115b167..3a4b493b26 100644
--- a/indra/llmessage/llbuffer.cpp
+++ b/indra/llmessage/llbuffer.cpp
@@ -142,7 +142,7 @@ LLHeapBuffer::~LLHeapBuffer()
S32 LLHeapBuffer::bytesLeft() const
{
- return (mSize - (mNextFree - mBuffer));
+ return (mSize - (S32)(mNextFree - mBuffer));
}
// virtual
@@ -371,11 +371,11 @@ LLBufferArray::segment_iterator_t LLBufferArray::splitAfter(U8* address)
return it;
}
S32 channel = (*it).getChannel();
- LLSegment segment1(channel, base, (address - base) + 1);
+ LLSegment segment1(channel, base, (S32)((address - base) + 1));
*it = segment1;
segment_iterator_t rv = it;
++it;
- LLSegment segment2(channel, address + 1, size - (address - base) - 1);
+ LLSegment segment2(channel, address + 1, (S32)(size - (address - base) - 1));
mSegments.insert(it, segment2);
return rv;
}
@@ -424,7 +424,7 @@ LLBufferArray::segment_iterator_t LLBufferArray::constructSegmentAfter(
segment = LLSegment(
(*rv).getChannel(),
address,
- (*rv).size() - (address - (*rv).data()));
+ (*rv).size() - (S32)(address - (*rv).data()));
}
else
{
@@ -533,7 +533,7 @@ S32 LLBufferArray::countAfter(S32 channel, U8* start) const
if(++start < ((*it).data() + (*it).size()))
{
// it's in the same segment
- offset = start - (*it).data();
+ offset = (S32)(start - (*it).data());
}
else if(++it == end)
{
@@ -586,7 +586,7 @@ U8* LLBufferArray::readAfter(
&& (*it).isOnChannel(channel))
{
// copy the data out of this segment
- S32 bytes_in_segment = (*it).size() - (start - (*it).data());
+ S32 bytes_in_segment = (*it).size() - (S32)(start - (*it).data());
bytes_to_copy = llmin(bytes_left, bytes_in_segment);
memcpy(dest, start, bytes_to_copy); /*Flawfinder: ignore*/
len += bytes_to_copy;
@@ -681,7 +681,7 @@ U8* LLBufferArray::seek(
{
if(delta > 0)
{
- S32 bytes_in_segment = (*it).size() - (start - (*it).data());
+ S32 bytes_in_segment = (*it).size() - (S32)(start - (*it).data());
S32 local_delta = llmin(delta, bytes_in_segment);
rv += local_delta;
delta -= local_delta;
@@ -689,7 +689,7 @@ U8* LLBufferArray::seek(
}
else
{
- S32 bytes_in_segment = start - (*it).data();
+ S32 bytes_in_segment = (S32)(start - (*it).data());
S32 local_delta = llmin(llabs(delta), bytes_in_segment);
rv -= local_delta;
delta += local_delta;