mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-03 17:35:51 +00:00
Add return values to OutputStream methods
This commit is contained in:
@@ -114,7 +114,7 @@ bool FileOutputStream::write (const void* const src, const size_t numBytes)
|
||||
return true;
|
||||
}
|
||||
|
||||
void FileOutputStream::writeRepeatedByte (uint8 byte, size_t numBytes)
|
||||
bool FileOutputStream::writeRepeatedByte (uint8 byte, size_t numBytes)
|
||||
{
|
||||
bassert (((ssize_t) numBytes) >= 0);
|
||||
|
||||
@@ -123,9 +123,8 @@ void FileOutputStream::writeRepeatedByte (uint8 byte, size_t numBytes)
|
||||
memset (buffer + bytesInBuffer, byte, numBytes);
|
||||
bytesInBuffer += numBytes;
|
||||
currentPosition += numBytes;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
OutputStream::writeRepeatedByte (byte, numBytes);
|
||||
}
|
||||
}
|
||||
|
||||
return OutputStream::writeRepeatedByte (byte, numBytes);
|
||||
}
|
||||
@@ -27,7 +27,6 @@
|
||||
#include "beast_File.h"
|
||||
#include "../streams/beast_OutputStream.h"
|
||||
|
||||
|
||||
//==============================================================================
|
||||
/**
|
||||
An output stream that writes into a local file.
|
||||
@@ -87,11 +86,11 @@ public:
|
||||
Result truncate();
|
||||
|
||||
//==============================================================================
|
||||
void flush();
|
||||
int64 getPosition();
|
||||
bool setPosition (int64 pos);
|
||||
bool write (const void* data, size_t numBytes);
|
||||
void writeRepeatedByte (uint8 byte, size_t numTimesToRepeat);
|
||||
void flush() override;
|
||||
int64 getPosition() override;
|
||||
bool setPosition (int64) override;
|
||||
bool write (const void*, size_t) override;
|
||||
bool writeRepeatedByte (uint8 byte, size_t numTimesToRepeat) override;
|
||||
|
||||
|
||||
private:
|
||||
@@ -111,4 +110,4 @@ private:
|
||||
ssize_t writeInternal (const void*, size_t);
|
||||
};
|
||||
|
||||
#endif // BEAST_FILEOUTPUTSTREAM_BEASTHEADER
|
||||
#endif
|
||||
Reference in New Issue
Block a user