diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-01-11 09:48:18 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-01-13 06:49:23 +0000 |
commit | e8b49f09074fe184374bee5062715357427ae044 (patch) | |
tree | b9cf1f5e3d7ab8b98345a512b6ddb0da42fe2919 /vcl/source/edit/textdoc.cxx | |
parent | 5e0e27e758e6f7fa325f36e6e51540e10bab0fdc (diff) |
new loplugin: useuniqueptr: vcl
Change-Id: Idcbc8655108ff57c06c33bbcabd652387bf3c4ec
Reviewed-on: https://gerrit.libreoffice.org/32948
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/source/edit/textdoc.cxx')
-rw-r--r-- | vcl/source/edit/textdoc.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/vcl/source/edit/textdoc.cxx b/vcl/source/edit/textdoc.cxx index c54e1358c1b8..aacd1d21cc75 100644 --- a/vcl/source/edit/textdoc.cxx +++ b/vcl/source/edit/textdoc.cxx @@ -29,21 +29,20 @@ static bool CompareStart( const std::unique_ptr<TextCharAttrib>& pFirst, const s TextCharAttrib::TextCharAttrib( const TextAttrib& rAttr, sal_Int32 nStart, sal_Int32 nEnd ) { - mpAttr = rAttr.Clone(); + mpAttr.reset( rAttr.Clone() ); mnStart = nStart; mnEnd = nEnd; } TextCharAttrib::TextCharAttrib( const TextCharAttrib& rTextCharAttrib ) { - mpAttr = rTextCharAttrib.GetAttr().Clone(); + mpAttr.reset( rTextCharAttrib.GetAttr().Clone() ); mnStart = rTextCharAttrib.mnStart; mnEnd = rTextCharAttrib.mnEnd; } TextCharAttrib::~TextCharAttrib() { - delete mpAttr; } TextCharAttribList::TextCharAttribList() |