comparison data/fileio/BZipFileDevice.cpp @ 1069:32ab6c48efaa

Merge from branch tonioni
author Chris Cannam
date Mon, 20 Apr 2015 09:11:34 +0100
parents cc27f35aa75c
children b3cb0edc25cd
comparison
equal deleted inserted replaced
1036:682d64f05e72 1069:32ab6c48efaa
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;