Program: gdcm
Module: $RCSfile: gdcmDicomDir.cxx,v $
Language: C++
- Date: $Date: 2005/01/18 07:53:41 $
- Version: $Revision: 1.104 $
+ Date: $Date: 2005/01/18 11:39:59 $
+ Version: $Revision: 1.105 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
DicomDirPatient *DicomDir::GetFirstEntry()
{
ItDicomDirPatient = Patients.begin();
- return *ItDicomDirPatient;
+ if ( ItDicomDirPatient != Patients.end() )
+ return *ItDicomDirPatient;
+ return NULL;
}
/**
*/
DicomDirPatient *DicomDir::GetNextEntry()
{
- if (ItDicomDirPatient != Patients.end())
+ gdcmAssertMacro (ItDicomDirPatient != Patients.end());
{
- DicomDirPatient *tmp = *ItDicomDirPatient;
++ItDicomDirPatient;
- return tmp;
- }
- else
- {
- return NULL;
+ if ( ItDicomDirPatient != Patients.end() )
+ return *ItDicomDirPatient;
}
+ return NULL;
}