From 1aa38057ef30785d1c1bcfcbcd3b17043c751774 Mon Sep 17 00:00:00 2001 From: emv Date: Fri, 4 Dec 2020 08:52:23 +0300 Subject: [PATCH] 0031976: Foundation Classes, BVH_IndexedBoxSet - access members of base class via this pointer --- src/BVH/BVH_IndexedBoxSet.hxx | 6 +++--- src/QABugs/QABugs_BVH.cxx | 6 ++++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/BVH/BVH_IndexedBoxSet.hxx b/src/BVH/BVH_IndexedBoxSet.hxx index dd822adce0..e62020d222 100644 --- a/src/BVH/BVH_IndexedBoxSet.hxx +++ b/src/BVH/BVH_IndexedBoxSet.hxx @@ -84,7 +84,7 @@ public: //! @name Necessary overrides for BVH construction //! Returns the bounding box with the given index. virtual BVH_Box Box (const Standard_Integer theIndex) const Standard_OVERRIDE { - return myBoxes[myIndices[theIndex]]; + return this->myBoxes[myIndices[theIndex]]; } //! Swaps indices of two specified boxes. @@ -95,9 +95,9 @@ public: //! @name Necessary overrides for BVH construction } //! Returns the Element with the index theIndex. - virtual DataType Element (const Standard_Integer theIndex) const + virtual DataType Element (const Standard_Integer theIndex) const Standard_OVERRIDE { - return myElements[myIndices[theIndex]]; + return this->myElements[myIndices[theIndex]]; } protected: //! @name Fields diff --git a/src/QABugs/QABugs_BVH.cxx b/src/QABugs/QABugs_BVH.cxx index a2c96aadaf..158dde8465 100644 --- a/src/QABugs/QABugs_BVH.cxx +++ b/src/QABugs/QABugs_BVH.cxx @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -207,8 +208,9 @@ static Standard_Integer QABVH_ShapeSelect (Draw_Interpretor& theDI, new BVH_LinearBuilder (); // Create the ShapeSet - opencascade::handle > aShapeBoxSet = - new BVH_BoxSet (aLBuilder); + opencascade::handle > aShapeBoxSet = !useVoidSelector ? + new BVH_BoxSet (aLBuilder) : + new BVH_IndexedBoxSet (aLBuilder); // Add elements into BVH