PIIODevice::bytesAvailible()
fix pistringlist pibinarystream write pibinarystream::binaryStreamSize() PIByteArray pibinarystream read with more size fix pistring pibinarystream read optimization fix bug in PIIOBinaryStream read and write if failed workaround in PIIOString::readDevice PISPI readDevice bug Fixed
This commit is contained in:
@@ -1136,13 +1136,15 @@ public:
|
||||
return true;
|
||||
}
|
||||
bool binaryStreamTakeImp(void * d_, size_t s) {
|
||||
if (size() < s)
|
||||
return false;
|
||||
memcpy(d_, data(), s);
|
||||
remove(0, s);
|
||||
return true;
|
||||
size_t rs = size();
|
||||
if (rs > s) rs = s;
|
||||
memcpy(d_, data(), rs);
|
||||
remove(0, rs);
|
||||
return rs == s;
|
||||
}
|
||||
|
||||
ssize_t binaryStreamSizeImp() const {return size();}
|
||||
|
||||
private:
|
||||
PIDeque<uchar> d;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user