diff options
author | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:20:29 +0200 |
---|---|---|
committer | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:20:29 +0200 |
commit | b8f13e45be884dc12884ebe8f3dcd9eecb23a106 (patch) | |
tree | 22a6d8b96815d626061ff3e2d432c13078fca5c4 /zen/read_txt.cpp | |
parent | 5.4 (diff) | |
download | FreeFileSync-b8f13e45be884dc12884ebe8f3dcd9eecb23a106.tar.gz FreeFileSync-b8f13e45be884dc12884ebe8f3dcd9eecb23a106.tar.bz2 FreeFileSync-b8f13e45be884dc12884ebe8f3dcd9eecb23a106.zip |
5.5
Diffstat (limited to 'zen/read_txt.cpp')
-rw-r--r-- | zen/read_txt.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/zen/read_txt.cpp b/zen/read_txt.cpp index fd92a10c..0fd310c2 100644 --- a/zen/read_txt.cpp +++ b/zen/read_txt.cpp @@ -5,13 +5,13 @@ using namespace zen; namespace { -std::string detectLineBreak(const Zstring& filename) //throw (FileError) +std::string detectLineBreak(const Zstring& filename) //throw FileError { //read a (hopefully) significant portion of data zen::FileInput input(filename); std::vector<char> buffer(64 * 1024); - size_t bytesRead = input.read(&buffer[0], buffer.size()); //throw (FileError); + size_t bytesRead = input.read(&buffer[0], buffer.size()); //throw FileError buffer.resize(bytesRead); //detect line break @@ -41,15 +41,15 @@ std::string detectLineBreak(const Zstring& filename) //throw (FileError) } -ExtractLines::ExtractLines(const Zstring& filename, const std::string& lineBreak) : //throw (FileError) +ExtractLines::ExtractLines(const Zstring& filename, const std::string& lineBreak) : //throw FileError inputStream(filename), bufferLogBegin(buffer.begin()), lineBreak_(lineBreak) { if (lineBreak.empty()) - lineBreak_ = detectLineBreak(filename); //throw (FileError) + lineBreak_ = detectLineBreak(filename); //throw FileError } -bool ExtractLines::getLine(std::string& output) //throw (FileError) +bool ExtractLines::getLine(std::string& output) //throw FileError { for (;;) { @@ -80,7 +80,7 @@ bool ExtractLines::getLine(std::string& output) //throw (FileError) const size_t BLOCK_SIZE = 512 * 1024; buffer.resize(buffer.size() + BLOCK_SIZE); - size_t bytesRead = inputStream.read(&buffer[0] + buffer.size() - BLOCK_SIZE, BLOCK_SIZE); //throw (FileError); + size_t bytesRead = inputStream.read(&buffer[0] + buffer.size() - BLOCK_SIZE, BLOCK_SIZE); //throw FileError assert(bytesRead <= BLOCK_SIZE); //promised by FileInput() if (bytesRead < BLOCK_SIZE) |