From 297b37bdd38f2a0539ec69327004fbe28130dc35 Mon Sep 17 00:00:00 2001 From: Nick Gasson Date: Sat, 22 Jan 2011 15:14:59 +0000 Subject: [PATCH] Remove redundant merge_vector --- src/Mesh.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/Mesh.cpp b/src/Mesh.cpp index 713da1b..cf2fc61 100644 --- a/src/Mesh.cpp +++ b/src/Mesh.cpp @@ -78,11 +78,6 @@ struct MeshBuffer : IMeshBuffer { return polymorphic_cast(a_ptr.get()); } - static bool merge_vector(const Vector& v1, const Vector& v2) - { - return v1 == v2; - } - vector chunks; ChunkPtr active_chunk; @@ -217,8 +212,8 @@ void MeshBuffer::add(const Vertex& vertex, // See if this vertex has already been added for (vector::iterator it = active_chunk->indices.begin(); it != active_chunk->indices.end(); ++it) { - if (merge_vector(vertex, active_chunk->vertices[*it]) - && merge_vector(normal, active_chunk->normals[*it])) { + if (vertex == active_chunk->vertices[*it] + && normal == active_chunk->normals[*it]) { const TexCoord& tc = active_chunk->tex_coords[*it]; const bool same_tc = (approx_equal(tc.x, a_tex_coord.x) -- 2.39.2