diff --git a/src/NCollection/NCollection_SparseArray.hxx b/src/NCollection/NCollection_SparseArray.hxx index b3ddd214c3..2d50b4925c 100644 --- a/src/NCollection/NCollection_SparseArray.hxx +++ b/src/NCollection/NCollection_SparseArray.hxx @@ -131,14 +131,13 @@ public: //! Direct const access to the item const TheItemType& Find (const Standard_Size theIndex) const { - return *(TheItemType*)this->getValue(theIndex); + return Value(theIndex); } - //! Modification access to the item; allocates space if - //! necessary and marks the item as defined + //! Modification access to the item TheItemType& ChangeFind (const Standard_Size theIndex) { - return *(TheItemType*)(this->changeValue (theIndex)); + return ChangeValue(theIndex); } //! Set a value as explicit method diff --git a/src/NCollection/NCollection_SparseArrayBase.hxx b/src/NCollection/NCollection_SparseArrayBase.hxx index 588cfa83f2..8bd0a290e8 100644 --- a/src/NCollection/NCollection_SparseArrayBase.hxx +++ b/src/NCollection/NCollection_SparseArrayBase.hxx @@ -237,10 +237,6 @@ protected: Standard_EXPORT Standard_Address setValue (const Standard_Size theIndex, const Standard_Address theValue); - //! Modification access to the item; allocates necessary space - //! and marks the item as defined - Standard_EXPORT Standard_Address changeValue (const Standard_Size theIndex); - //! Copy contents of theOther to this; //! assumes that this and theOther have exactly the same type of arguments Standard_EXPORT void assign (const NCollection_SparseArrayBase& theOther);