[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    koffice/libs/pigment
From:       Emanuele Tamponi <emanuele () valinor ! it>
Date:       2008-02-17 23:43:14
Message-ID: 1203291794.986195.19821.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 776391 by tamponi:

Use signed int (it can be -1) avoiding tons of warning.


 M  +4 -4      KoColorSpaceAbstract.h  
 M  +1 -1      KoColorSpaceTraits.h  
 M  +2 -2      compositeops/KoCompositeOpOver.h  


--- trunk/koffice/libs/pigment/KoColorSpaceAbstract.h #776390:776391
@@ -63,9 +63,9 @@
             Q_UNUSED( maskRowStart );
             Q_UNUSED( maskRowStride );
             Q_UNUSED( channelFlags );
-            
+
             qint32 srcInc = (srcRowStride == 0) ? 0 : colorSpace()->pixelSize();
-            
+
             quint8 *dst = dstRowStart;
             const quint8 *src = srcRowStart;
             const KoColorSpace* cs = colorSpace();
@@ -220,7 +220,7 @@
                 for (uint i = 0; i < _CSTraits::channels_nb; i++)
                 {
                     compositetype v = totals[i] / factor + offset;
-                    if (   (allChannels && i != _CSTraits::alpha_pos ) 
+                    if (   (allChannels && i != (uint)_CSTraits::alpha_pos )
                         || (!allChannels && channelFlags.testBit( i ) ) )
                     {
                         dstColor[ i ] = CLAMP(v, \
KoColorSpaceMathsTraits<channels_type>::min, @@ -373,7 +373,7 @@
         {
             return _CSTraits::alpha(U8_pixel);
         }
-        
+
         virtual void setAlpha(quint8 * pixels, quint8 alpha, qint32 nPixels) const
         {
             _CSTraits::setAlpha(pixels, alpha, nPixels);
--- trunk/koffice/libs/pigment/KoColorSpaceTraits.h #776390:776391
@@ -43,7 +43,7 @@
     static const quint32 channels_nb = _channels_nb_;
     /// the position of the alpha channel in the channels of the pixel (or -1 if no \
alpha  /// channel.
-    static const quint32 alpha_pos = _alpha_pos_;
+    static const qint32 alpha_pos = _alpha_pos_;
     /// the number of bit for each channel
     static const int depth = KoColorSpaceMathsTraits<_channels_type_>::bits;
     /**
--- trunk/koffice/libs/pigment/compositeops/KoCompositeOpOver.h #776390:776391
@@ -52,9 +52,9 @@
             if (srcBlend == NATIVE_OPACITY_OPAQUE) {
                 memcpy(dstN, srcN, pixelSize);
             } else {
-                for(uint i = 0; i <  _CSTraits::channels_nb; i++)
+                for(int i = 0; (uint)i <  _CSTraits::channels_nb; i++)
                 {
-                    if( (uint)i != _CSTraits::alpha_pos && (  channelFlags.isEmpty() \
|| channelFlags.testBit( i ) ) ) +                    if( i != _CSTraits::alpha_pos \
                && (  channelFlags.isEmpty() || channelFlags.testBit( i ) ) )
                         dstN[i] = KoColorSpaceMaths<channels_type>::blend(srcN[i], \
dstN[i], srcBlend);  }
             }


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic