diff options
author | Oz Linden <oz@lindenlab.com> | 2015-08-26 12:07:16 -0400 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2015-08-26 12:07:16 -0400 |
commit | 712a4e70c81c1908e4e7668ff1695a9415ec4b71 (patch) | |
tree | b5312334f90e4359dce19eb696954dbcca5f5fd6 /indra/newview/llvoavatar.cpp | |
parent | 206ef7a1562db19a4d8a41e55b7272c917f4b62c (diff) |
refine fix for MAINT-5560 based on review feedback and to fix VS objection
Diffstat (limited to 'indra/newview/llvoavatar.cpp')
-rwxr-xr-x | indra/newview/llvoavatar.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 303b677dcf..5d83a20f50 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -8283,15 +8283,16 @@ void LLVOAvatar::idleUpdateRenderComplexity() } } -void LLVOAvatar::modifyAttachmentGeometryBytes(S32 delta) +void LLVOAvatar::addAttachmentSizes(U32 delta_bytes, F32 delta_area) { - mAttachmentGeometryBytes = llmax(mAttachmentGeometryBytes + delta, 0); + mAttachmentGeometryBytes += delta_bytes; + mAttachmentSurfaceArea += delta_area; } -void LLVOAvatar::modifyAttachmentSurfaceArea(F32 delta) +void LLVOAvatar::subtractAttachmentSizes(U32 delta_bytes, F32 delta_area) { - F32 newval = mAttachmentSurfaceArea + delta; - mAttachmentSurfaceArea = ( newval > 0.0 ? newval : 0.0 ); + mAttachmentGeometryBytes = delta_bytes > mAttachmentGeometryBytes ? 0 : mAttachmentGeometryBytes - delta_bytes; + mAttachmentSurfaceArea = delta_area > mAttachmentSurfaceArea ? 0.0 : mAttachmentSurfaceArea - delta_area; } void LLVOAvatar::updateVisualComplexity() |