From 31ba05810c641f14e8ab5da8ad2aaf527779f6c1 Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Fri, 15 Aug 2008 23:45:37 -0500 Subject: Second Life viewer sources 1.19.1.2 --- linden/indra/llmath/lloctree.h | 2 -- linden/indra/llmath/llvolume.cpp | 2 +- linden/indra/llmath/llvolumemgr.cpp | 11 +++-------- linden/indra/llmath/llvolumemgr.h | 2 +- 4 files changed, 5 insertions(+), 12 deletions(-) (limited to 'linden/indra/llmath') diff --git a/linden/indra/llmath/lloctree.h b/linden/indra/llmath/lloctree.h index 203cb41..52ad1bb 100644 --- a/linden/indra/llmath/lloctree.h +++ b/linden/indra/llmath/lloctree.h @@ -567,8 +567,6 @@ public: { } - bool isLeaf() { return false; } - bool balance() { if (this->getChildCount() == 1 && diff --git a/linden/indra/llmath/llvolume.cpp b/linden/indra/llmath/llvolume.cpp index 7403724..4f1c260 100644 --- a/linden/indra/llmath/llvolume.cpp +++ b/linden/indra/llmath/llvolume.cpp @@ -1859,7 +1859,7 @@ inline U32 sculpt_xy_to_index(U32 x, U32 y, U16 sculpt_width, U16 sculpt_height, U32 index = (x + y * sculpt_width) * sculpt_components; // attempt to resolve DEV-11158 - remove assert later. - llassert(index < sculpt_width * sculpt_height * sculpt_components); + //llassert(index < sculpt_width * sculpt_height * sculpt_components); return index; } diff --git a/linden/indra/llmath/llvolumemgr.cpp b/linden/indra/llmath/llvolumemgr.cpp index 4bf7ca6..db99959 100644 --- a/linden/indra/llmath/llvolumemgr.cpp +++ b/linden/indra/llmath/llvolumemgr.cpp @@ -229,12 +229,6 @@ LLVolumeLODGroup::LLVolumeLODGroup(const LLVolumeParams ¶ms) LLVolumeLODGroup::~LLVolumeLODGroup() { - S32 i; - for (i = 0; i < NUM_LODS; i++) - { - delete mVolumeLODs[i]; - mVolumeLODs[i] = NULL; - } } @@ -242,11 +236,12 @@ LLVolume * LLVolumeLODGroup::getLOD(const S32 detail) { llassert(detail >=0 && detail < NUM_LODS); mAccessCount[detail]++; - mLODRefs[detail]++; - if (!mVolumeLODs[detail]) + + if (!mLODRefs[detail]) { mVolumeLODs[detail] = new LLVolume(mParams, mDetailScales[detail]); } + mLODRefs[detail]++; return mVolumeLODs[detail]; } diff --git a/linden/indra/llmath/llvolumemgr.h b/linden/indra/llmath/llvolumemgr.h index 0d6aa56..889bc56 100644 --- a/linden/indra/llmath/llvolumemgr.h +++ b/linden/indra/llmath/llvolumemgr.h @@ -69,7 +69,7 @@ protected: LLVolumeParams mParams; S32 mLODRefs[NUM_LODS]; - LLVolume *mVolumeLODs[NUM_LODS]; + LLPointer mVolumeLODs[NUM_LODS]; static F32 mDetailThresholds[NUM_LODS]; static F32 mDetailScales[NUM_LODS]; S32 mAccessCount[NUM_LODS]; -- cgit v1.1