Mercurial > hg > svcore
comparison data/fileio/BZipFileDevice.cpp @ 1038:cc27f35aa75c cxx11
Introducing the signed 64-bit frame index type, and fixing build failures from inclusion of -Wconversion with -Werror. Not finished yet.
author | Chris Cannam |
---|---|
date | Tue, 03 Mar 2015 15:18:24 +0000 |
parents | e802e550a1f2 |
children | b3cb0edc25cd |
comparison
equal
deleted
inserted
replaced
1037:bf0e5944289b | 1038:cc27f35aa75c |
---|---|
176 BZipFileDevice::readData(char *data, qint64 maxSize) | 176 BZipFileDevice::readData(char *data, qint64 maxSize) |
177 { | 177 { |
178 if (m_atEnd) return 0; | 178 if (m_atEnd) return 0; |
179 | 179 |
180 int bzError = BZ_OK; | 180 int bzError = BZ_OK; |
181 int read = BZ2_bzRead(&bzError, m_bzFile, data, maxSize); | 181 int read = BZ2_bzRead(&bzError, m_bzFile, data, int(maxSize)); |
182 | 182 |
183 // SVDEBUG << "BZipFileDevice::readData: requested " << maxSize << ", read " << read << endl; | 183 // SVDEBUG << "BZipFileDevice::readData: requested " << maxSize << ", read " << read << endl; |
184 | 184 |
185 if (bzError != BZ_OK) { | 185 if (bzError != BZ_OK) { |
186 if (bzError != BZ_STREAM_END) { | 186 if (bzError != BZ_STREAM_END) { |
199 | 199 |
200 qint64 | 200 qint64 |
201 BZipFileDevice::writeData(const char *data, qint64 maxSize) | 201 BZipFileDevice::writeData(const char *data, qint64 maxSize) |
202 { | 202 { |
203 int bzError = BZ_OK; | 203 int bzError = BZ_OK; |
204 BZ2_bzWrite(&bzError, m_bzFile, (void *)data, maxSize); | 204 BZ2_bzWrite(&bzError, m_bzFile, (void *)data, int(maxSize)); |
205 | 205 |
206 // SVDEBUG << "BZipFileDevice::writeData: " << maxSize << " to write" << endl; | 206 // SVDEBUG << "BZipFileDevice::writeData: " << maxSize << " to write" << endl; |
207 | 207 |
208 if (bzError != BZ_OK) { | 208 if (bzError != BZ_OK) { |
209 cerr << "BZipFileDevice::writeData: error condition" << endl; | 209 cerr << "BZipFileDevice::writeData: error condition" << endl; |