diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-05-08 10:33:15 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-05-14 17:12:51 +0200 |
commit | 7ebb57228f27a95eb1648500b5becb3febb9d316 (patch) | |
tree | 67325c19fc6ce0de57f279588feea3e758f86043 /include/formula | |
parent | 38fa68b90ae50d9bf25cf22fef36e030282b44a3 (diff) |
loplugin:useuniqueptr in FormulaTokenArray
Change-Id: I5716295d2f0c88c6daf0570941d5dd4c5ff03a33
Reviewed-on: https://gerrit.libreoffice.org/54168
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/formula')
-rw-r--r-- | include/formula/tokenarray.hxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/formula/tokenarray.hxx b/include/formula/tokenarray.hxx index 087f7eacb83f..c0376812a9fb 100644 --- a/include/formula/tokenarray.hxx +++ b/include/formula/tokenarray.hxx @@ -230,7 +230,7 @@ public: class FORMULA_DLLPUBLIC FormulaTokenArray { protected: - FormulaToken** pCode; // Token code array + std::unique_ptr<FormulaToken*[]> pCode; // Token code array FormulaToken** pRPN; // RPN array sal_uInt16 nLen; // Length of token array sal_uInt16 nRPN; // Length of RPN array @@ -363,11 +363,11 @@ public: memcpy( pRPN, pData, nSize * sizeof( FormulaToken* ) ); } - FormulaToken** GetArray() const { return pCode; } + FormulaToken** GetArray() const { return pCode.get(); } FormulaTokenArrayStandardRange Tokens() const { - return FormulaTokenArrayStandardRange(pCode, nLen); + return FormulaTokenArrayStandardRange(pCode.get(), nLen); } FormulaToken** GetCode() const { return pRPN; } |