From: malaterre Date: Fri, 31 Oct 2003 11:29:59 +0000 (+0000) Subject: *FIX: VC++ compilation, still for loop dummy stuff X-Git-Tag: Version0.3.1~61 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=191decf8eab0497d96e871b0a49bf1d12d7b4529;p=gdcm.git *FIX: VC++ compilation, still for loop dummy stuff *FIX: alpha start point was not set properly *ENH: memset default everything to zero (in case lengthR/G/B is < 255) *ENH: spare a few pointers operations :) --- diff --git a/src/gdcmHeader.cxx b/src/gdcmHeader.cxx index c93c47d9..a398ad35 100644 --- a/src/gdcmHeader.cxx +++ b/src/gdcmHeader.cxx @@ -1,4 +1,4 @@ -// $Header: /cvs/public/gdcm/src/Attic/gdcmHeader.cxx,v 1.105 2003/10/31 10:38:34 jpr Exp $ +// $Header: /cvs/public/gdcm/src/Attic/gdcmHeader.cxx,v 1.106 2003/10/31 11:29:59 malaterre Exp $ #include "gdcmHeader.h" @@ -2246,7 +2246,8 @@ void * gdcmHeader::GetLUTRGBA(void) { char *LUTRGBA = (char *)calloc(1024,1); // 256 * 4 (R, G, B, Alpha) if (!LUTRGBA) { return NULL; - } + } + memset(LUTRGBA, 0, 1024); // Bits Allocated int nb; std::string str_nb = GetPubElValByNumber(0x0028,0x0100); @@ -2270,23 +2271,25 @@ void * gdcmHeader::GetLUTRGBA(void) { // and fix the code // We give up the checking to avoid some overhead char *a; - a= LUTRGBA+debR; - for(int i=0;i