--- ogr/ogrsf_frmts/ili/ogrili2layer.cpp 2006-06-08 10:40:06.804746888 +0200 +++ /home/furai/extProjects/Gdal/gdal_unstable/ogr/ogrsf_frmts/ili/ogrili2layer.cpp 2006-06-08 10:35:53.648232528 +0200 @@ -1,5 +1,5 @@ /****************************************************************************** - * $Id: ogrili2layer.cpp,v 1.4 2005/11/21 14:56:31 pka Exp $ + * $Id: ogrili2layer.cpp,v 1.5 2006/06/06 17:49:07 pka Exp $ * * Project: Interlis 2 Translator * Purpose: Implements OGRILI2Layer class. @@ -28,6 +28,9 @@ ****************************************************************************** * * $Log: ogrili2layer.cpp,v $ + * Revision 1.5 2006/06/06 17:49:07 pka + * STL compatibility (Bug 1178) + * * Revision 1.4 2005/11/21 14:56:31 pka * Fix for call of GetNextFeature without ResetReading (Interlis 2) * Fix for polygonizer crash on Linux with GEOS 2.1.3 (Interlis 1) @@ -47,7 +50,7 @@ #include "cpl_conv.h" #include "cpl_string.h" -CPL_CVSID("$Id: ogrili2layer.cpp,v 1.4 2005/11/21 14:56:31 pka Exp $"); +CPL_CVSID("$Id: ogrili2layer.cpp,v 1.5 2006/06/06 17:49:07 pka Exp $"); /************************************************************************/ /* OGRILI2Layer() */ @@ -73,7 +76,6 @@ poFeatureDefn->SetGeomType( eReqType ); bWriter = bWriterIn; - listFeatureIt = 0; } /************************************************************************/ @@ -116,6 +118,7 @@ OGRErr OGRILI2Layer::SetFeature (OGRFeature *poFeature) { listFeature.push_back(poFeature); + if (listFeature.size() == 1) ResetReading(); return OGRERR_NONE; } @@ -132,7 +135,6 @@ /************************************************************************/ OGRFeature *OGRILI2Layer::GetNextFeature() { - if (listFeatureIt == 0) listFeatureIt = listFeature.begin(); if (listFeatureIt != listFeature.end()) return *(listFeatureIt++); return NULL;