From: malaterre Date: Mon, 13 Dec 2004 06:25:39 +0000 (+0000) Subject: BUG: On VS6 the for loop does not respect scope. Therefore we either need to rename... X-Git-Tag: Version1.0.bp~502 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=a6b2e43b6f550f8f915ff4d37aa9c4893b4d61d3;p=gdcm.git BUG: On VS6 the for loop does not respect scope. Therefore we either need to rename iterator or declare it outside of the for loop --- diff --git a/src/gdcmPixelReadConvert.cxx b/src/gdcmPixelReadConvert.cxx index 3f99d2e8..97756456 100644 --- a/src/gdcmPixelReadConvert.cxx +++ b/src/gdcmPixelReadConvert.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmPixelReadConvert.cxx,v $ Language: C++ - Date: $Date: 2004/12/13 06:22:43 $ - Version: $Revision: 1.7 $ + Date: $Date: 2004/12/13 06:25:39 $ + Version: $Revision: 1.8 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -489,8 +489,8 @@ ReadAndDecompressJPEGSingleFrameFragmentsFromFile( std::ifstream* fp ) { // Loop on the fragment[s] to get total length size_t totalLength = 0; - for( JPEGFragmentsInfo::JPEGFragmentsList::iterator - it = JPEGInfo->Fragments.begin(); + JPEGFragmentsInfo::JPEGFragmentsList::iterator it; + for( it = JPEGInfo->Fragments.begin(); it != JPEGInfo->Fragments.end(); ++it ) { @@ -503,15 +503,14 @@ ReadAndDecompressJPEGSingleFrameFragmentsFromFile( std::ifstream* fp ) uint8_t* localRaw = Raw; // Loop on the fragment[s] - for( JPEGFragmentsInfo::JPEGFragmentsList::iterator - it = JPEGInfo->Fragments.begin(); + for( it = JPEGInfo->Fragments.begin(); it != JPEGInfo->Fragments.end(); ++it ) { fp->seekg( (*it)->Offset, std::ios::beg); size_t len = (*it)->Length; fp->read((char *)p,len); - p+=len; + p += len; } size_t howManyRead = 0;