summaryrefslogtreecommitdiff
path: root/vcl/inc/textlineinfo.hxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-07-10 09:48:28 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-07-10 12:39:37 +0200
commit804cd2bd56295c5cb039b55ac7ca880c17399bad (patch)
treee511b34a9e74b81cf378cb3e7bd78533474b6876 /vcl/inc/textlineinfo.hxx
parent7e73c033a128403bdeeb8be323e43ba2c7c8f8b4 (diff)
loplugin:useuniqueptr in vcl
Change-Id: Ieece2f9728755a8ae91275535eaa39319eea274e Reviewed-on: https://gerrit.libreoffice.org/39740 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/inc/textlineinfo.hxx')
-rw-r--r--vcl/inc/textlineinfo.hxx11
1 files changed, 6 insertions, 5 deletions
diff --git a/vcl/inc/textlineinfo.hxx b/vcl/inc/textlineinfo.hxx
index 519aa489c9e0..03b19ede96e6 100644
--- a/vcl/inc/textlineinfo.hxx
+++ b/vcl/inc/textlineinfo.hxx
@@ -20,6 +20,9 @@
#ifndef INCLUDED_VCL_INC_TEXTLINEINFO_HXX
#define INCLUDED_VCL_INC_TEXTLINEINFO_HXX
+#include <memory>
+#include <vector>
+
class ImplTextLineInfo
{
private:
@@ -52,16 +55,14 @@ public:
void Clear();
ImplTextLineInfo* GetLine( sal_Int32 nLine ) const
- { return mpLines[nLine]; }
- sal_Int32 Count() const { return mnLines; }
+ { return mvLines[nLine].get(); }
+ sal_Int32 Count() const { return mvLines.size(); }
private:
ImplMultiTextLineInfo( const ImplMultiTextLineInfo& ) = delete;
ImplMultiTextLineInfo& operator=( const ImplMultiTextLineInfo& ) = delete;
- ImplTextLineInfo** mpLines;
- sal_Int32 mnLines;
- sal_Int32 mnSize;
+ std::vector<std::unique_ptr<ImplTextLineInfo>> mvLines;
};