SVN commit 1043297 by cgilles: fix MSVC warnings under win32 M +7 -5 dimg/filters/iccprofile.cpp M +16 -14 dimg/filters/icctransform.cpp M +3 -4 widgets/iccprofiles/cietonguewidget.cpp --- trunk/extragear/graphics/digikam/libs/dimg/filters/iccprofile.cpp #1043296:1043297 @@ -86,7 +86,7 @@ { if (handle) { - LcmsLock lock(); + LcmsLock lock; cmsCloseProfile(handle); handle = 0; } @@ -286,7 +286,7 @@ if (!d->data.isEmpty()) { - LcmsLock lock(); + LcmsLock lock; d->handle = cmsOpenProfileFromMem(d->data.data(), (DWORD)d->data.size()); } else if (!d->filePath.isNull()) @@ -296,7 +296,8 @@ if (d->data.isEmpty()) return false; - LcmsLock lock(); + + LcmsLock lock; d->handle = cmsOpenProfileFromMem(d->data.data(), (DWORD)d->data.size()); } @@ -338,7 +339,7 @@ if (!open()) return QString(); - LcmsLock lock(); + LcmsLock lock; const char *desc = cmsTakeProductDesc(d->handle); if (desc && desc[0] != '\0') @@ -358,7 +359,8 @@ if (!open()) return InvalidType; - LcmsLock lock(); + LcmsLock lock; + switch ((int)cmsGetDeviceClass(d->handle)) { case icSigInputClass: --- trunk/extragear/graphics/digikam/libs/dimg/filters/icctransform.cpp #1043296:1043297 @@ -144,7 +144,7 @@ if (handle) { currentDescription = TransformDescription(); - LcmsLock lock(); + LcmsLock lock; cmsDeleteTransform(handle); handle = 0; } @@ -217,7 +217,7 @@ void IccTransform::init() { - LcmsLock lock(); + LcmsLock lock; cmsErrorAction(LCMS_ERROR_SHOW); } @@ -372,7 +372,7 @@ description.transformFlags |= cmsFLAGS_WHITEBLACKCOMPENSATION; } - LcmsLock lock(); + LcmsLock lock; // Do not use TYPE_BGR_ - this implies 3 bytes per pixel, but even if !image.hasAlpha(), // our image data has 4 bytes per pixel with the fourth byte filled with 0xFF. if (image.sixteenBit()) @@ -462,7 +462,7 @@ d->currentDescription = description; - LcmsLock lock(); + LcmsLock lock; d->handle = cmsCreateTransform(description.inputProfile, description.inputFormat, description.outputProfile, @@ -495,7 +495,7 @@ d->currentDescription = description; - LcmsLock lock(); + LcmsLock lock; d->handle = cmsCreateProofingTransform(description.inputProfile, description.inputFormat, description.outputProfile, @@ -608,10 +608,10 @@ void IccTransform::transform(DImg& image, const TransformDescription& description, DImgLoaderObserver *observer) { const int bytesDepth = image.bytesDepth(); - const int pixels = image.width() * image.height(); + const int pixels = image.width() * image.height(); // convert ten scanlines in a batch const int pixelsPerStep = image.width() * 10; - uchar *data = image.bits(); + uchar *data = image.bits(); // see dimgloader.cpp, granularity(). int granularity=1; @@ -625,8 +625,8 @@ for (int p=pixels; p > 0; p -= pixelsPerStep) { int pixelsThisStep = qMin(p, pixelsPerStep); - int size = pixelsThisStep * bytesDepth; - LcmsLock lock(); + int size = pixelsThisStep * bytesDepth; + LcmsLock lock; cmsDoTransform(d->handle, data, data, pixelsThisStep); data += size; if (observer && p <= checkPoint) @@ -642,8 +642,8 @@ for (int p=pixels; p > 0; p -= pixelsPerStep) { int pixelsThisStep = qMin(p, pixelsPerStep); - int size = pixelsThisStep * bytesDepth; - LcmsLock lock(); + int size = pixelsThisStep * bytesDepth; + LcmsLock lock; memcpy(buffer.data(), data, size); cmsDoTransform(d->handle, buffer.data(), data, pixelsThisStep); data += size; @@ -668,7 +668,7 @@ { int pixelsThisStep = qMin(p, pixelsPerStep); int size = pixelsThisStep * bytesDepth; - LcmsLock lock(); + LcmsLock lock; cmsDoTransform(d->handle, data, data, pixelsThisStep); data += size; } @@ -679,12 +679,14 @@ d->close(); } -/*void IccTransform::closeProfiles() +/* +void IccTransform::closeProfiles() { d->inputProfile.close(); d->outputProfile.close(); d->proofProfile.close(); d->embeddedProfile.close(); -}*/ +} +*/ } // namespace Digikam --- trunk/extragear/graphics/digikam/libs/widgets/iccprofiles/cietonguewidget.cpp #1043296:1043297 @@ -248,9 +248,8 @@ { if (!profileData.isEmpty()) { - LcmsLock lock(); - cmsHPROFILE hProfile = cmsOpenProfileFromMem((void*)profileData.data(), - (DWORD)profileData.size()); + LcmsLock lock; + cmsHPROFILE hProfile = cmsOpenProfileFromMem((void*)profileData.data(), (DWORD)profileData.size()); if (!hProfile) { @@ -283,7 +282,7 @@ { if (!file.isEmpty() && file.isValid()) { - LcmsLock lock(); + LcmsLock lock; cmsHPROFILE hProfile = cmsOpenProfileFromFile(QFile::encodeName(file.toLocalFile()), "r"); if (!hProfile)