From 138ca81e4d36510ffee7f6ffe6b75aca3ae40afe Mon Sep 17 00:00:00 2001 From: Thomas Fischer <thomas.fischer@ufz.de> Date: Thu, 5 Jun 2014 07:31:39 +0200 Subject: [PATCH] [GeoLib] createPolygonTrees(): Fix C++11 issue. std::list::erase pre C++11 implementation does not take a const iterator. This commit can be reverted if Travis uses a newer version of gcc. --- GeoLib/SimplePolygonTree.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/GeoLib/SimplePolygonTree.h b/GeoLib/SimplePolygonTree.h index f05c8845dd8..adbaf2a157a 100644 --- a/GeoLib/SimplePolygonTree.h +++ b/GeoLib/SimplePolygonTree.h @@ -86,8 +86,9 @@ private: template <typename POLYGONTREETYPE> void createPolygonTrees (std::list<POLYGONTREETYPE*>& list_of_simple_polygon_hierarchies) { - typedef typename std::list<POLYGONTREETYPE*>::const_iterator IT; - for (IT it0(list_of_simple_polygon_hierarchies.begin()); + typedef typename std::list<POLYGONTREETYPE*>::const_iterator CIT; + typedef typename std::list<POLYGONTREETYPE*>::iterator IT; + for (CIT it0(list_of_simple_polygon_hierarchies.begin()); it0 != list_of_simple_polygon_hierarchies.end(); ++it0) { IT it1 = list_of_simple_polygon_hierarchies.begin(); while (it1 != list_of_simple_polygon_hierarchies.end()) { -- GitLab