summaryrefslogtreecommitdiff
path: root/zen/serialize.h
diff options
context:
space:
mode:
authorDaniel Wilhelm <daniel@wili.li>2015-10-02 14:55:46 +0200
committerDaniel Wilhelm <daniel@wili.li>2015-10-02 14:55:46 +0200
commitb32d1e948b32a8f7607ebc30f10dda903426f63c (patch)
tree7fa78f18308671970198981b650e237bcd84957e /zen/serialize.h
parent7.0 (diff)
downloadFreeFileSync-b32d1e948b32a8f7607ebc30f10dda903426f63c.tar.gz
FreeFileSync-b32d1e948b32a8f7607ebc30f10dda903426f63c.tar.bz2
FreeFileSync-b32d1e948b32a8f7607ebc30f10dda903426f63c.zip
7.1
Diffstat (limited to 'zen/serialize.h')
-rw-r--r--zen/serialize.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/zen/serialize.h b/zen/serialize.h
index 4af12af1..a41745e4 100644
--- a/zen/serialize.h
+++ b/zen/serialize.h
@@ -91,7 +91,7 @@ struct MemoryStreamIn
const size_t bytesRead = std::min(len, buffer.size() - pos);
auto itFirst = buffer.begin() + pos;
std::copy(itFirst, itFirst + bytesRead, static_cast<char*>(data));
- pos += bytesRead;
+ pos += bytesRead;
return bytesRead;
}
@@ -144,7 +144,7 @@ template <class BinInputStream, class BinOutputStream> inline
void copyStream(BinInputStream& streamIn, BinOutputStream& streamOut, size_t blockSize,
const std::function<void(std::int64_t bytesDelta)>& onNotifyCopyStatus) //optional
{
- assert(blockSize > 0);
+ assert(blockSize > 0);
std::vector<char> buffer(blockSize);
for (;;)
{
@@ -167,7 +167,7 @@ void saveBinStream(const Zstring& filepath, //throw FileError
{
MemoryStreamIn<BinContainer> streamIn(cont);
FileOutput streamOut(filepath, zen::FileOutput::ACC_OVERWRITE); //throw FileError, (ErrorTargetExisting)
- if (onUpdateStatus) onUpdateStatus(0); //throw X!
+ if (onUpdateStatus) onUpdateStatus(0); //throw X!
copyStream(streamIn, streamOut, streamOut.optimalBlockSize(), onUpdateStatus); //throw FileError
}
@@ -177,7 +177,7 @@ BinContainer loadBinStream(const Zstring& filepath, //throw FileError
const std::function<void(std::int64_t bytesDelta)>& onUpdateStatus) //optional
{
FileInput streamIn(filepath); //throw FileError, ErrorFileLocked
- if (onUpdateStatus) onUpdateStatus(0); //throw X!
+ if (onUpdateStatus) onUpdateStatus(0); //throw X!
MemoryStreamOut<BinContainer> streamOut;
copyStream(streamIn, streamOut, streamIn.optimalBlockSize(), onUpdateStatus); //throw FileError
return streamOut.ref();
bgstack15