Skip to content

Commit f080d4f

Browse files
committed
STYLE: FUTURE REMOVE/deprecate VariableLengthVector::AllocateElements
Although AllocateElements is a public member function of VariableLengthVector, it was only used internally, by VariableLengthVector itself.
1 parent bb79801 commit f080d4f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Modules/Core/Common/include/itkVariableLengthVector.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -761,12 +761,15 @@ class ITK_TEMPLATE_EXPORT VariableLengthVector
761761
void
762762
Reserve(ElementIdentifier size);
763763

764+
#ifndef ITK_FUTURE_LEGACY_REMOVE
764765
/** Allocate memory of certain size and return it.
765766
* \return a non-null pointer to an array of \c size elements (0 is a valid
766767
* parameter).
768+
* \deprecated Please consider calling `std::make_unique<TValue[]>(size)` instead.
767769
*/
768-
[[nodiscard]] TValue *
770+
[[deprecated("Please consider calling `std::make_unique<TValue[]>(size)` instead.")]] [[nodiscard]] TValue *
769771
AllocateElements(ElementIdentifier size) const;
772+
#endif
770773

771774
[[nodiscard]] const TValue *
772775
GetDataPointer() const

0 commit comments

Comments
 (0)