[PATCH] New image loader (Softimage PIC)

Ingo Klöcker kloecker at kde.org
Fri Aug 31 21:54:09 BST 2007

On Thursday 30 August 2007 10:19, Ruben Lopez wrote:
> Ingo Klöcker wrote:
> > I am much more concerned about the usage of the arithmetic shift
> > operator on variables of type unsigned char. A char is 8 bit wide
> > so for example b << 8 might be 0 for some compilers/on some
> > architectures. Or does char always expand to a 32-bit integer when
> > its bits are shifted? I guess the answer is "It _should_ on 32+-bit
> > architectures."
> >
> > I have observed a weird problem with a few signed chars being
> > casted to float and back which yielded different results in debug
> > and release builds with vc7, so I wouldn't be surprised if the
> > above would still break for some compiler.
> I have changed these unsigned char to unsigned. This should fix the
> problem on most architectures.


> Anyway, when integrating this code 
> with kdelibs or kdegraphics configure (CMake?) system, maybe I could
> use more portable types (like uint32 or something like that).
> About the float problems, where did you identified them?

Sorry for causing confusion. Those float problems occurred in a totally 
different project. I just mentioned them as an example.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20070831/701d7a62/attachment.sig>

More information about the kde-core-devel mailing list