summaryrefslogtreecommitdiff
path: root/basegfx/source/matrix/b3dhommatrix.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'basegfx/source/matrix/b3dhommatrix.cxx')
-rw-r--r--basegfx/source/matrix/b3dhommatrix.cxx10
1 files changed, 4 insertions, 6 deletions
diff --git a/basegfx/source/matrix/b3dhommatrix.cxx b/basegfx/source/matrix/b3dhommatrix.cxx
index e0c049c5bf55..919a00c9fb50 100644
--- a/basegfx/source/matrix/b3dhommatrix.cxx
+++ b/basegfx/source/matrix/b3dhommatrix.cxx
@@ -21,6 +21,7 @@
#include <basegfx/matrix/b3dhommatrix.hxx>
#include <hommatrixtemplate.hxx>
#include <basegfx/vector/b3dvector.hxx>
+#include <memory>
namespace basegfx
{
@@ -94,18 +95,15 @@ namespace basegfx
bool B3DHomMatrix::invert()
{
Impl3DHomMatrix aWork(*mpImpl);
- sal_uInt16* pIndex = new sal_uInt16[Impl3DHomMatrix_Base::getEdgeLength()];
+ std::unique_ptr<sal_uInt16[]> pIndex( new sal_uInt16[Impl3DHomMatrix_Base::getEdgeLength()] );
sal_Int16 nParity;
- if(aWork.ludcmp(pIndex, nParity))
+ if(aWork.ludcmp(pIndex.get(), nParity))
{
- mpImpl->doInvert(aWork, pIndex);
- delete[] pIndex;
-
+ mpImpl->doInvert(aWork, pIndex.get());
return true;
}
- delete[] pIndex;
return false;
}