summaryrefslogtreecommitdiff
path: root/i18npool/source/search/levdis.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'i18npool/source/search/levdis.hxx')
-rw-r--r--i18npool/source/search/levdis.hxx13
1 files changed, 4 insertions, 9 deletions
diff --git a/i18npool/source/search/levdis.hxx b/i18npool/source/search/levdis.hxx
index daf8778806a3..1c4604ffd11e 100644
--- a/i18npool/source/search/levdis.hxx
+++ b/i18npool/source/search/levdis.hxx
@@ -96,8 +96,8 @@
/** "Safe" memory allocation in ctor */
class WLevDisPatternMem
{
- sal_Unicode *cp;
- bool *bp;
+ std::unique_ptr<sal_Unicode[]> cp;
+ std::unique_ptr<bool[]> bp;
public:
explicit WLevDisPatternMem( sal_Int32 s )
: cp(new sal_Unicode[s])
@@ -105,13 +105,8 @@ public:
{
}
- ~WLevDisPatternMem()
- {
- delete [] cp;
- delete [] bp;
- }
- sal_Unicode* GetcPtr() const { return cp; }
- bool* GetbPtr() const { return bp; }
+ sal_Unicode* GetcPtr() const { return cp.get(); }
+ bool* GetbPtr() const { return bp.get(); }
};
class WLevDisDistanceMem