mirror of
https://github.com/Open-Cascade-SAS/OCCT.git
synced 2026-05-22 04:37:23 +08:00
0022815: Missing delete operator for placement new
This commit is contained in:
@@ -15,12 +15,6 @@
|
||||
|
||||
#include <NCollection_BaseCollection.hxx>
|
||||
|
||||
#ifdef WNT
|
||||
// Disable the warning "operator new unmatched by delete"
|
||||
#pragma warning (push)
|
||||
#pragma warning (disable:4291)
|
||||
#endif
|
||||
|
||||
// *********************************************** Template for Array1 class
|
||||
|
||||
/**
|
||||
@@ -86,10 +80,6 @@ template <class TheItemType> class NCollection_Array1
|
||||
//! Variable value access
|
||||
virtual TheItemType& ChangeValue (void) const
|
||||
{ return myArray->ChangeValue(myCurrent); }
|
||||
//! Operator new for allocating iterators
|
||||
void* operator new(size_t theSize,
|
||||
const Handle(NCollection_BaseAllocator)& theAllocator)
|
||||
{ return theAllocator->Allocate(theSize); }
|
||||
private:
|
||||
Standard_Integer myCurrent; //!< Index of the current item
|
||||
NCollection_Array1* myArray; //!< Pointer to the array being iterated
|
||||
@@ -277,8 +267,4 @@ template <class TheItemType> class NCollection_Array1
|
||||
TheItemType* myData; //!< Pointer to '0'th array item
|
||||
};
|
||||
|
||||
#ifdef WNT
|
||||
#pragma warning (pop)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user