summaryrefslogtreecommitdiff
path: root/basic/source/inc
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-04-29 18:40:45 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-05-02 08:25:37 +0200
commit1cb646dc5fe56c614d2740cdc60d382f3d660b6b (patch)
treed22449d6b6139c7c3460bd67896e5467781a8329 /basic/source/inc
parent73414e3fe8d8cede2c4bc3bc605618873db003c4 (diff)
loplugin:useuniqueptr in SbiImage
Change-Id: I24ee5de3628d6436dc045cb543d35b16074ef189 Reviewed-on: https://gerrit.libreoffice.org/53700 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'basic/source/inc')
-rw-r--r--basic/source/inc/image.hxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/basic/source/inc/image.hxx b/basic/source/inc/image.hxx
index f79e3c51c98a..f286e3e286fb 100644
--- a/basic/source/inc/image.hxx
+++ b/basic/source/inc/image.hxx
@@ -47,9 +47,9 @@ class SbiImage {
SbxArrayRef rTypes; // User defined types
SbxArrayRef rEnums; // Enum types
std::vector<sal_uInt32> mvStringOffsets; // StringId-Offsets
- sal_Unicode* pStrings; // StringPool
- char* pCode; // Code-Image
- char* pLegacyPCode; // Code-Image
+ std::unique_ptr<sal_Unicode[]> pStrings; // StringPool
+ std::unique_ptr<char[]> pCode; // Code-Image
+ std::unique_ptr<char[]> pLegacyPCode; // Code-Image
bool bError;
SbiImageFlags nFlags;
sal_uInt32 nStringSize;
@@ -63,7 +63,7 @@ class SbiImage {
// routines for the compiler:
void MakeStrings( short ); // establish StringPool
void AddString( const OUString& );
- void AddCode( char*, sal_uInt32 );
+ void AddCode( std::unique_ptr<char[]>, sal_uInt32 );
void AddType(SbxObject const *);
void AddEnum(SbxObject *);
@@ -83,7 +83,7 @@ public:
bool Save( SvStream&, sal_uInt32 = B_CURVERSION );
bool IsError() { return bError; }
- const char* GetCode() const { return pCode; }
+ const char* GetCode() const { return pCode.get(); }
sal_uInt32 GetCodeSize() const { return nCodeSize; }
sal_uInt16 GetBase() const { return nDimBase; }
OUString GetString( short nId ) const;