On Tue, Jul 6, 2010 at 00:06, Edouard Gomez <[email protected]> wrote:
> Big endian support kind of broke the nef decoding on my box.
>
> I narrowed it down to the fact the NefDecoder constructor was
> passed a copy instead of a ref. This caused a ByteStream instance
> to be used in all cases, whatever the endianness, because the
> copy constructor is called implicitly during argument passing.

Yeah - that caught me out - I was just annoyed that I couldn't use
pass-by-reference in GCC while have the constructor in the function
call. I guess there is some obscure rule about that, and I forgot to
update the windows machine, where I do my testing. Stupid.

I'm trying to force myself into avoid using new/delete, since the code
is much cleaner when using the scope for destruction. Anyway, as you
probably have noticed, I switched back to passing a pointer (I
panicked a bit, when I realized that I had broken all Nikon images, so
I went back to something I knew would work).

> Bonus fix for the Int swap reader, the pos+=4; statement wasn't
> reachable. I also added a few casts to make sure the right thing
> is done in the short read function.

Thanks! I'll commit it in a sec. Just running a few tests! :)

(also thanks to Hubert - I went away from reference thing, but you are
completely right!)


Best regards, Klaus

_______________________________________________
Rawstudio-dev mailing list
[email protected]
http://rawstudio.org/cgi-bin/mailman/listinfo/rawstudio-dev

Reply via email to