diff options
author | Brad Linden <46733234+brad-linden@users.noreply.github.com> | 2024-10-04 14:16:04 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-04 14:16:04 -0700 |
commit | da341eb2daa361ffb974e2593a217778dfbb3383 (patch) | |
tree | 803c64a784bb4be4d8b2dce92e16cb6c32aad8cf /indra/llprimitive/llmodel.cpp | |
parent | 0e86bebcfc80259476654190880f9bfd5b35934e (diff) |
cherry pick secondlife/viewer#912 BugSplat Crash 1412267: nvoglv64+0xadcd00 (#2785)
* secondlife/viewer#912 BugSplat Crash 1412267: nvoglv64+0xadcd00
* fix cherry-pick merge breakage.
* Fix signed/unsigned error
---------
Co-authored-by: Alexander Gavriliuk <alexandrgproductengine@lindenlab.com>
Diffstat (limited to 'indra/llprimitive/llmodel.cpp')
-rw-r--r-- | indra/llprimitive/llmodel.cpp | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/indra/llprimitive/llmodel.cpp b/indra/llprimitive/llmodel.cpp index 9908a155f2..4e3e49ec9f 100644 --- a/indra/llprimitive/llmodel.cpp +++ b/indra/llprimitive/llmodel.cpp @@ -91,19 +91,15 @@ std::string LLModel::getStatusString(U32 status) } -void LLModel::offsetMesh( const LLVector3& pivotPoint ) +void LLModel::offsetMesh(const LLVector3& pivotPoint) { - LLVector4a pivot( pivotPoint[VX], pivotPoint[VY], pivotPoint[VZ] ); + LLVector4a pivot(pivotPoint[VX], pivotPoint[VY], pivotPoint[VZ]); - for (std::vector<LLVolumeFace>::iterator faceIt = mVolumeFaces.begin(); faceIt != mVolumeFaces.end(); ) + for (LLVolumeFace& face : mVolumeFaces) { - std::vector<LLVolumeFace>:: iterator currentFaceIt = faceIt++; - LLVolumeFace& face = *currentFaceIt; - LLVector4a *pos = (LLVector4a*) face.mPositions; - - for (S32 i=0; i<face.mNumVertices; ++i ) + for (S32 i = 0; i < face.mNumVertices; ++i) { - pos[i].add( pivot ); + face.mPositions[i].add(pivot); } } } @@ -338,7 +334,7 @@ void LLModel::normalizeVolumeFaces() } } -void LLModel::getNormalizedScaleTranslation(LLVector3& scale_out, LLVector3& translation_out) +void LLModel::getNormalizedScaleTranslation(LLVector3& scale_out, LLVector3& translation_out) const { scale_out = mNormalizedScale; translation_out = mNormalizedTranslation; |