summaryrefslogtreecommitdiff
path: root/indra/llmath/llvolume.cpp
diff options
context:
space:
mode:
authorGraham Madarasz (Graham Linden) <graham@lindenlab.com>2013-03-13 10:42:40 -0700
committerGraham Madarasz (Graham Linden) <graham@lindenlab.com>2013-03-13 10:42:40 -0700
commit5d2fea6262d91eb8d3c06d97a160ca9373b96889 (patch)
treecee0767a4cdf64a1167ece1d5b5645d0266f9069 /indra/llmath/llvolume.cpp
parentab60c46a917366574fa7292b6e7142ece858bec5 (diff)
Move fast memcpy to llcommon and use it in llalignedarray pushback on all platforms. Code Review: DaveP
Diffstat (limited to 'indra/llmath/llvolume.cpp')
-rw-r--r--indra/llmath/llvolume.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp
index 4f3e753276..e7a0bc7df7 100644
--- a/indra/llmath/llvolume.cpp
+++ b/indra/llmath/llvolume.cpp
@@ -4729,10 +4729,13 @@ void LLVolumeFace::optimize(F32 angle_cutoff)
}
}
- llassert(new_face.mNumIndices == mNumIndices);
- llassert(new_face.mNumVertices <= mNumVertices);
-
- swapData(new_face);
+ // Only swap data if we've actually optimized the mesh
+ //
+ if (new_face.mNumVertices < mNumVertices)
+ {
+ llassert(new_face.mNumIndices == mNumIndices);
+ swapData(new_face);
+ }
}
class LLVCacheTriangleData;