summaryrefslogtreecommitdiff
path: root/zen/file_io.h
diff options
context:
space:
mode:
authorDaniel Wilhelm <shieldwed@outlook.com>2018-05-09 00:07:03 +0200
committerDaniel Wilhelm <shieldwed@outlook.com>2018-05-09 00:07:03 +0200
commit1aab211abb68b40cefb5024d0be373589c9c8f99 (patch)
tree2da4ead196df622081ac45b29678e92ed30476a3 /zen/file_io.h
parent9.5 (diff)
downloadFreeFileSync-1aab211abb68b40cefb5024d0be373589c9c8f99.tar.gz
FreeFileSync-1aab211abb68b40cefb5024d0be373589c9c8f99.tar.bz2
FreeFileSync-1aab211abb68b40cefb5024d0be373589c9c8f99.zip
9.6
Diffstat (limited to 'zen/file_io.h')
-rwxr-xr-xzen/file_io.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/zen/file_io.h b/zen/file_io.h
index c2071500..369cdc01 100755
--- a/zen/file_io.h
+++ b/zen/file_io.h
@@ -1,6 +1,6 @@
// *****************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
-// * GNU General Public License: http://www.gnu.org/licenses/gpl-3.0 *
+// * GNU General Public License: https://www.gnu.org/licenses/gpl-3.0 *
// * Copyright (C) Zenju (zenju AT freefilesync DOT org) - All Rights Reserved *
// *****************************************************************************
@@ -64,8 +64,11 @@ public:
private:
size_t tryRead(void* buffer, size_t bytesToRead); //throw FileError, ErrorFileLocked; may return short, only 0 means EOF! => CONTRACT: bytesToRead > 0!
- std::vector<char> memBuf_;
const IOCallback notifyUnbufferedIO_; //throw X
+
+ std::vector<char> memBuf_ = std::vector<char>(getBlockSize());
+ size_t bufPos_ = 0;
+ size_t bufPosEnd_= 0;
};
@@ -90,8 +93,11 @@ public:
private:
size_t tryWrite(const void* buffer, size_t bytesToWrite); //throw FileError; may return short! CONTRACT: bytesToWrite > 0
- std::vector<char> memBuf_;
IOCallback notifyUnbufferedIO_; //throw X
+
+ std::vector<char> memBuf_ = std::vector<char>(getBlockSize());
+ size_t bufPos_ = 0;
+ size_t bufPosEnd_ = 0;
};
//-----------------------------------------------------------------------------------------------
bgstack15