From 9c18b6cff7165bdc7f111b3d45ca8ad9ddcc0231 Mon Sep 17 00:00:00 2001 From: Chris Want Date: Sun, 29 Dec 2002 15:59:51 +0000 Subject: While building with gcc on Irix one is confronted by the message: ---------------------------->8---------------------------------------------- g++ -DHAVE_CONFIG_H -I. -I../../../blender/intern/bsp -I../.. -I../../../blender/intern/container -I../../../blender/intern/moto/include -I../../../blender/intern/memutil -I/usr/freeware/include -g -funsigned-char -c ../../../blender/intern/bsp/intern/BSP_CSGMesh.cpp -MT BSP_CSGMesh.lo -MD -MP -MF .deps/BSP_CSGMesh.TPlo -DPIC -o .libs/BSP_CSGMesh.lo /usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.0.4/include/g++/bits/stl_iterator.h: In constructor `std::__normal_iterator<_Iterator, _Container>::__normal_iterator(const std::__normal_iterator<_Iter, _Container>&) [with _Iter = const BSP_MFace*, _Iterator = BSP_MFace*, _Container = std::vector >]': ../../../blender/intern/bsp/intern/BSP_CSGMesh.cpp:270: instantiated from here /usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.0.4/include/g++/bits/stl_iterator.h:474: cannot convert `const BSP_MFace* const' to `BSP_MFace*' in initialization *** Error code 1 (bu21) *** Error code 1 (bu21) *** Error code 1 (bu21) *** Error code 1 (bu21) ---------------------------->8---------------------------------------------- The line in question that causes the error is the middle one in this group: vector::const_iterator f_it_end = FaceSet().end(); vector::const_iterator f_it_begin = FaceSet().begin(); vector::iterator f_it = FaceSet().begin(); Dropping the 'const_' from that middle line enables gcc to compile the file correctly (this is also consistent with what is going on with other parts of the file, i.e., stuff that is returned from a begin() method is declared as vector::iterator instead of vector::const_iterator. But I'll be honest: I have no idea what this code does, so if somebody with better C++ skills wants to check it, then please do. This change was also tested to compile and run on debian linux/x86 (well, booleans are broken right now, so I wasn't able to do too much testing). Chris --- intern/bsp/intern/BSP_CSGMesh.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'intern/bsp') diff --git a/intern/bsp/intern/BSP_CSGMesh.cpp b/intern/bsp/intern/BSP_CSGMesh.cpp index efc7ba0f706..a1da3d544ab 100755 --- a/intern/bsp/intern/BSP_CSGMesh.cpp +++ b/intern/bsp/intern/BSP_CSGMesh.cpp @@ -251,7 +251,7 @@ BuildEdges( //edges vector::const_iterator f_it_end = FaceSet().end(); - vector::const_iterator f_it_begin = FaceSet().begin(); + vector::iterator f_it_begin = FaceSet().begin(); vector::iterator f_it = FaceSet().begin(); vector & vertex_set = VertexSet(); -- cgit v1.2.3