diff options
| author | Dave Parks <davep@lindenlab.com> | 2022-05-16 12:26:17 -0500 |
|---|---|---|
| committer | Dave Parks <davep@lindenlab.com> | 2022-05-16 12:26:17 -0500 |
| commit | b2141e94465998d13ab4b5d894b0edcdad0e8216 (patch) | |
| tree | cba0541baffa141e9e3e2aecd16ce8cd9457c88c /indra/llmath | |
| parent | 3400e5fd302c0d9dea6386c4d5bf38876f2cc287 (diff) | |
| parent | 63095005578007345d9916ebc6855246cdb08c7c (diff) | |
Merge remote-tracking branch 'remotes/origin/DRTVWR-546' into DRTVWR-559
Diffstat (limited to 'indra/llmath')
| -rw-r--r-- | indra/llmath/lloctree.h | 12 | ||||
| -rw-r--r-- | indra/llmath/llvolume.cpp | 4 |
2 files changed, 11 insertions, 5 deletions
diff --git a/indra/llmath/lloctree.h b/indra/llmath/lloctree.h index 2283df1e1a..a9a54a8113 100644 --- a/indra/llmath/lloctree.h +++ b/indra/llmath/lloctree.h @@ -73,7 +73,7 @@ template <class T> class LLOctreeTravelerDepthFirst : public LLOctreeTraveler<T> { public: - virtual void traverse(const LLOctreeNode<T>* node); + virtual void traverse(const LLOctreeNode<T>* node) override; }; template <class T> @@ -696,7 +696,7 @@ public: { } - bool balance() + bool balance() override { //LL_PROFILE_ZONE_NAMED_COLOR("Octree::balance()",OCTREE_DEBUG_COLOR_BALANCE); @@ -732,7 +732,7 @@ public: } // LLOctreeRoot::insert - bool insert(T* data) + bool insert(T* data) override { if (data == NULL) { @@ -835,6 +835,12 @@ public: return false; } + + bool isLeaf() const override + { + // root can't be a leaf + return false; + } }; //======================== diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp index 3727ce85af..5099920f32 100644 --- a/indra/llmath/llvolume.cpp +++ b/indra/llmath/llvolume.cpp @@ -414,7 +414,7 @@ public: max.setMax(max, *tri->mV[2]); } } - else if (!branch->isLeaf()) + else if (branch->getChildCount() > 0) { //no data, but child nodes exist LLVolumeOctreeListener* child = (LLVolumeOctreeListener*) branch->getChild(0)->getListener(0); @@ -424,7 +424,7 @@ public: } else { - LL_ERRS() << "Empty leaf" << LL_ENDL; + llassert(!branch->isLeaf()); // Empty leaf } for (S32 i = 0; i < branch->getChildCount(); ++i) |
