diff options
author | Scott Wheeler <scott@directededge.com> | 2018-10-10 19:24:44 +0200 |
---|---|---|
committer | Scott Wheeler <scott@directededge.com> | 2018-10-10 19:24:44 +0200 |
commit | 8ca75f03b5e9a19282ea01a0a5590bd345f2f92e (patch) | |
tree | 3d3a2ca7ad90f6ef7646a6265fff40aee5c7741e | |
parent | 036a0317b928f74de63fb197a29dc8e0e1e8cf4f (diff) |
Follow TagLib's brace style
-rw-r--r-- | taglib/toolkit/tfilestream.cpp | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/taglib/toolkit/tfilestream.cpp b/taglib/toolkit/tfilestream.cpp index 7e75e396..487df8e3 100644 --- a/taglib/toolkit/tfilestream.cpp +++ b/taglib/toolkit/tfilestream.cpp @@ -159,13 +159,11 @@ FileStream::FileStream(FileName fileName, bool openReadOnly) d->file = openFile(fileName, true); if(d->file == InvalidFileHandle) - { # ifdef _WIN32 debug("Could not open file " + fileName.toString()); # else debug("Could not open file " + String(static_cast<const char *>(d->name))); # endif - } } FileStream::FileStream(int fileDescriptor, bool openReadOnly) @@ -182,9 +180,7 @@ FileStream::FileStream(int fileDescriptor, bool openReadOnly) d->file = openFile(fileDescriptor, true); if(d->file == InvalidFileHandle) - { debug("Could not open file using file descriptor"); - } } FileStream::~FileStream() @@ -284,8 +280,7 @@ void FileStream::insert(const ByteVector &data, unsigned long start, unsigned lo ByteVector buffer = data; ByteVector aboutToOverwrite(static_cast<unsigned int>(bufferLength)); - while(true) - { + while(true) { // Seek to the current read position and read the data that we're about // to overwrite. Appropriately increment the readPosition. @@ -333,8 +328,7 @@ void FileStream::removeBlock(unsigned long start, unsigned long length) ByteVector buffer(static_cast<unsigned int>(bufferLength)); - for(unsigned int bytesRead = -1; bytesRead != 0;) - { + for(unsigned int bytesRead = -1; bytesRead != 0;) { seek(readPosition); bytesRead = static_cast<unsigned int>(readFile(d->file, buffer)); readPosition += bytesRead; @@ -430,7 +424,8 @@ long FileStream::tell() const const LARGE_INTEGER zero = {}; LARGE_INTEGER position; - if(SetFilePointerEx(d->file, zero, &position, FILE_CURRENT) && position.QuadPart <= LONG_MAX) { + if(SetFilePointerEx(d->file, zero, &position, FILE_CURRENT) && + position.QuadPart <= LONG_MAX) { return static_cast<long>(position.QuadPart); } else { @@ -499,9 +494,8 @@ void FileStream::truncate(long length) #else const int error = ftruncate(fileno(d->file), length); - if(error != 0) { + if(error != 0) debug("FileStream::truncate() -- Coundn't truncate the file."); - } #endif } |