← Back to team overview

kicad-developers team mailing list archive

PATCH: 3D resolver iterator bug

 

Some compilers complain when a const_iterator is used as an
argument to insert( iterator, object). This patch works around the
issue by declaring two iterators as non-const types.

- Cirilo
=== modified file '3d-viewer/3d_cache/3d_filename_resolver.cpp'
--- 3d-viewer/3d_cache/3d_filename_resolver.cpp	2016-06-12 22:46:00 +0000
+++ 3d-viewer/3d_cache/3d_filename_resolver.cpp	2016-06-13 22:04:49 +0000
@@ -741,8 +741,8 @@
 
     // check if the alias exists; if not then add it to the end of the
     // env var section of the path list
-    std::list< S3D_ALIAS >::const_iterator sPL = m_Paths.begin();
-    std::list< S3D_ALIAS >::const_iterator ePL = m_Paths.end();
+    std::list< S3D_ALIAS >::iterator sPL = m_Paths.begin();
+    std::list< S3D_ALIAS >::iterator ePL = m_Paths.end();
 
     while( sPL != ePL )
     {


Follow ups