diff options
Diffstat (limited to 'intern')
-rw-r--r-- | intern/bsp/intern/BSP_CSGHelper.cpp | 2 | ||||
-rwxr-xr-x | intern/bsp/intern/BSP_CSGMesh_CFIterator.h | 17 | ||||
-rwxr-xr-x | intern/bsp/intern/BSP_CSGUserData.cpp | 11 | ||||
-rwxr-xr-x | intern/bsp/intern/BSP_Triangulate.cpp | 2 |
4 files changed, 16 insertions, 16 deletions
diff --git a/intern/bsp/intern/BSP_CSGHelper.cpp b/intern/bsp/intern/BSP_CSGHelper.cpp index 0932d9bcdb9..705d9858bb8 100644 --- a/intern/bsp/intern/BSP_CSGHelper.cpp +++ b/intern/bsp/intern/BSP_CSGHelper.cpp @@ -412,7 +412,7 @@ DuplicateMesh( // duplicate the face data for this face. o_f_data.Duplicate(i_f_data[*f_faces_it]); - output.AddSubTriangle(dup_face,&triangle_indices[i]); + output.AddSubTriangle(dup_face,triangle_indices.begin() + i); } } diff --git a/intern/bsp/intern/BSP_CSGMesh_CFIterator.h b/intern/bsp/intern/BSP_CSGMesh_CFIterator.h index 4c31dda5d8f..5fb6d794e7a 100755 --- a/intern/bsp/intern/BSP_CSGMesh_CFIterator.h +++ b/intern/bsp/intern/BSP_CSGMesh_CFIterator.h @@ -75,7 +75,7 @@ BSP_CSGMesh_VertexIt_Done( // assume CSG_IteratorPtr is of the correct type. BSP_CSGMesh_VertexIt * vertex_it = (BSP_CSGMesh_VertexIt *)it; - if (vertex_it->pos < &(*vertex_it->mesh->VertexSet().end())) return 0; + if (vertex_it->pos < vertex_it->mesh->VertexSet().end()) return 0; return 1; }; @@ -109,7 +109,7 @@ BSP_CSGMesh_VertexIt_Reset( ) { // assume CSG_IteratorPtr is of the correct type. BSP_CSGMesh_VertexIt * vertex_it = (BSP_CSGMesh_VertexIt *)it; - vertex_it->pos = &vertex_it->mesh->VertexSet()[0]; + vertex_it->pos = vertex_it->mesh->VertexSet().begin(); }; static @@ -128,7 +128,7 @@ BSP_CSGMeshVertexIt_Construct( BSP_CSGMesh_VertexIt * v_it = new BSP_CSGMesh_VertexIt; v_it->mesh = mesh; - v_it->pos = &mesh->VertexSet()[0]; + v_it->pos = mesh->VertexSet().begin(); output->it = v_it; }; @@ -167,7 +167,7 @@ BSP_CSGMesh_FaceIt_Done( // assume CSG_IteratorPtr is of the correct type. BSP_CSGMesh_FaceIt * face_it = (BSP_CSGMesh_FaceIt *)it; - if (face_it->pos < &(*face_it->mesh->FaceSet().end())) { + if (face_it->pos < face_it->mesh->FaceSet().end()) { if (face_it->face_triangle + 3 <= face_it->pos->m_verts.size()) { return 0; } @@ -196,7 +196,7 @@ BSP_CSGMesh_FaceIt_Fill( // time to change the iterator type to an integer... face_it->mesh->FaceData().Copy( face->user_face_data, - int(face_it->pos - &face_it->mesh->FaceSet()[0]) + int(face_it->pos - face_it->mesh->FaceSet().begin()) ); // Copy face vertex data across... @@ -228,8 +228,7 @@ BSP_CSGMesh_FaceIt_Step( BSP_CSGMesh_FaceIt * face_it = (BSP_CSGMesh_FaceIt *)it; // safety guard - if (face_it->pos < &(*face_it->mesh->FaceSet().end())) { - + if (face_it->pos < face_it->mesh->FaceSet().end()) { if (face_it->face_triangle + 3 < face_it->pos->m_verts.size()) { (face_it->face_triangle)++; } else { @@ -246,7 +245,7 @@ BSP_CSGMesh_FaceIt_Reset( ) { // assume CSG_IteratorPtr is of the correct type. BSP_CSGMesh_FaceIt * f_it = (BSP_CSGMesh_FaceIt *)it; - f_it->pos = &f_it->mesh->FaceSet()[0]; + f_it->pos = f_it->mesh->FaceSet().begin(); f_it->face_triangle = 0; }; @@ -266,7 +265,7 @@ BSP_CSGMesh_FaceIt_Construct( BSP_CSGMesh_FaceIt * f_it = new BSP_CSGMesh_FaceIt; f_it->mesh = mesh; - f_it->pos = &mesh->FaceSet()[0]; + f_it->pos = mesh->FaceSet().begin(); f_it->face_triangle = 0; output->it = f_it; diff --git a/intern/bsp/intern/BSP_CSGUserData.cpp b/intern/bsp/intern/BSP_CSGUserData.cpp index a22f88f2f24..4bd37bac34f 100755 --- a/intern/bsp/intern/BSP_CSGUserData.cpp +++ b/intern/bsp/intern/BSP_CSGUserData.cpp @@ -66,7 +66,7 @@ Duplicate( int output = Size(); IncSize(); - memcpy(&m_data[ m_data.size() - 1 - m_width ], record, m_width); + memcpy(m_data.end() - m_width,record,m_width); return output; } @@ -80,8 +80,9 @@ Duplicate( ){ if (m_width) { IncSize(); - memcpy(&m_data[ m_data.size() - 1 - m_width ], - &m_data[ record_index * m_width], m_width); + + memcpy(m_data.end() - m_width,m_data.begin() + + record_index * m_width,m_width); } } @@ -93,7 +94,7 @@ Copy( int pos ){ if (m_width) { - memcpy(output, &m_data[m_width*pos],m_width); + memcpy(output,m_data.begin() + m_width*pos,m_width); } } void @@ -132,6 +133,6 @@ BSP_CSGUserData:: operator [] ( const int pos ){ - return &m_data[ m_width*pos ]; + return m_data.begin() + m_width*pos; } diff --git a/intern/bsp/intern/BSP_Triangulate.cpp b/intern/bsp/intern/BSP_Triangulate.cpp index fbfba62b907..e1132e460ec 100755 --- a/intern/bsp/intern/BSP_Triangulate.cpp +++ b/intern/bsp/intern/BSP_Triangulate.cpp @@ -219,7 +219,7 @@ Process( /* Try and snip this triangle off from the current polygon.*/ - if ( Snip(verts,contour,u,v,w,nv, &m_V[0]) ) + if ( Snip(verts,contour,u,v,w,nv,m_V.begin()) ) { int a,b,c,s,t; |