Fix gcc2 build.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40896 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -95,7 +95,7 @@ status_t
|
|||||||
BRawNetBuffer::ReadString(BString& string)
|
BRawNetBuffer::ReadString(BString& string)
|
||||||
{
|
{
|
||||||
string = "";
|
string = "";
|
||||||
size_t readed = _ReadStringAt(string, fReadPosition);
|
int32 readed = _ReadStringAt(string, fReadPosition);
|
||||||
if (readed < 0)
|
if (readed < 0)
|
||||||
return B_ERROR;
|
return B_ERROR;
|
||||||
fReadPosition += readed;
|
fReadPosition += readed;
|
||||||
@@ -122,13 +122,13 @@ BRawNetBuffer::_Init(const void* buf, size_t size)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
size_t
|
int32
|
||||||
BRawNetBuffer::_ReadStringAt(BString& string, off_t pos)
|
BRawNetBuffer::_ReadStringAt(BString& string, off_t pos)
|
||||||
{
|
{
|
||||||
if (pos >= fBuffer.BufferLength())
|
if (pos >= fBuffer.BufferLength())
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
size_t readed = 0;
|
int32 readed = 0;
|
||||||
char* buffer = (char*)fBuffer.Buffer();
|
char* buffer = (char*)fBuffer.Buffer();
|
||||||
buffer = &buffer[pos];
|
buffer = &buffer[pos];
|
||||||
// if the string is compressed we have to follow the links to the
|
// if the string is compressed we have to follow the links to the
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
void _Init(const void* buf, size_t size);
|
void _Init(const void* buf, size_t size);
|
||||||
size_t _ReadStringAt(BString& string, off_t pos);
|
int32 _ReadStringAt(BString& string, off_t pos);
|
||||||
|
|
||||||
off_t fWritePosition;
|
off_t fWritePosition;
|
||||||
off_t fReadPosition;
|
off_t fReadPosition;
|
||||||
|
|||||||
Reference in New Issue
Block a user