[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: koffice/libs/pigment
From: Cyrille Berger <cyb () lepi ! org>
Date: 2010-11-24 21:39:53
Message-ID: 20101124213953.B098EAC8A2 () svn ! kde ! org
[Download RAW message or body]
SVN commit 1200380 by berger:
use static and a class, instead of extern. Hopefully fix crash at exit of Kexi.
M +2 -2 KoColorSpaceMaths.cpp
M +8 -7 KoColorSpaceMaths.h
--- trunk/koffice/libs/pigment/KoColorSpaceMaths.cpp #1200379:1200380
@@ -51,5 +51,5 @@
const KoChannelInfo::enumChannelValueType \
KoColorSpaceMathsTraits<qint16>::channelValueType = KoChannelInfo::INT16; const \
KoChannelInfo::enumChannelValueType \
KoColorSpaceMathsTraits<quint32>::channelValueType = KoChannelInfo::UINT32;
-const Ko::FullLut< KoIntegerToFloat<quint16>, float, quint16> KoUint16ToFloatLut;
-const Ko::FullLut< KoIntegerToFloat<quint8>, float, quint8> KoUint8ToFloatLut;
+const Ko::FullLut< KoIntegerToFloat<quint16>, float, quint16> KoLuts::Uint16ToFloat;
+const Ko::FullLut< KoIntegerToFloat<quint8>, float, quint8> KoLuts::Uint8ToFloat;
--- trunk/koffice/libs/pigment/KoColorSpaceMaths.h #1200379:1200380
@@ -202,11 +202,12 @@
}
};
+struct KoLuts {
-extern PIGMENTCMS_EXPORT const Ko::FullLut< KoIntegerToFloat<quint16>, float, \
quint16> KoUint16ToFloatLut;
-extern PIGMENTCMS_EXPORT const Ko::FullLut< KoIntegerToFloat<quint8>, float, quint8> \
KoUint8ToFloatLut; + static PIGMENTCMS_EXPORT const Ko::FullLut< \
KoIntegerToFloat<quint16>, float, quint16> Uint16ToFloat; + static PIGMENTCMS_EXPORT \
const Ko::FullLut< KoIntegerToFloat<quint8>, float, quint8> Uint8ToFloat; +};
-
/**
* This class defines some elementary operations used by various color
* space. It's intended to be generic, but some specialization exists
@@ -278,7 +279,7 @@
template<>
inline double KoColorSpaceMaths<quint8, double>::scaleToA(quint8 a)
{
- return KoUint8ToFloatLut(a);
+ return KoLuts::Uint8ToFloat(a);
}
template<>
@@ -291,7 +292,7 @@
template<>
inline double KoColorSpaceMaths<quint16, double>::scaleToA(quint16 a)
{
- return KoUint16ToFloatLut(a);
+ return KoLuts::Uint16ToFloat(a);
}
template<>
@@ -324,7 +325,7 @@
template<>
inline float KoColorSpaceMaths<quint16, float>::scaleToA(quint16 a)
{
- return KoUint16ToFloatLut(a);
+ return KoLuts::Uint16ToFloat(a);
}
template<>
@@ -337,7 +338,7 @@
template<>
inline float KoColorSpaceMaths<quint8, float>::scaleToA(quint8 a)
{
- return KoUint8ToFloatLut(a);
+ return KoLuts::Uint8ToFloat(a);
}
template<>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic