summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--idlc/inc/astsequence.hxx7
-rw-r--r--idlc/inc/fehelper.hxx10
-rw-r--r--idlc/source/astdump.cxx2
3 files changed, 4 insertions, 15 deletions
diff --git a/idlc/inc/astsequence.hxx b/idlc/inc/astsequence.hxx
index 20dac9b4fdc0..1a7a2073f763 100644
--- a/idlc/inc/astsequence.hxx
+++ b/idlc/inc/astsequence.hxx
@@ -29,11 +29,6 @@ public:
, m_pMemberType(pMemberType)
, m_pRelativName(nullptr)
{}
- virtual ~AstSequence() override
- {
- if ( m_pRelativName )
- delete m_pRelativName;
- }
AstType const * getMemberType() const
{ return m_pMemberType; }
@@ -44,7 +39,7 @@ public:
virtual const sal_Char* getRelativName() const override;
private:
AstType const * m_pMemberType;
- mutable OString* m_pRelativName;
+ mutable std::unique_ptr<OString> m_pRelativName;
};
#endif // INCLUDED_IDLC_INC_ASTSEQUENCE_HXX
diff --git a/idlc/inc/fehelper.hxx b/idlc/inc/fehelper.hxx
index 11668e6946be..be401defcaa1 100644
--- a/idlc/inc/fehelper.hxx
+++ b/idlc/inc/fehelper.hxx
@@ -46,16 +46,10 @@ public:
NodeType nodeType, OString* pName, OString const * pInherits,
std::vector< OString > const * typeParameters);
- ~FeInheritanceHeader()
- {
- if ( m_pName )
- delete m_pName;
- }
-
NodeType getNodeType() const
{ return m_nodeType; }
OString* getName()
- { return m_pName; }
+ { return m_pName.get(); }
AstDeclaration* getInherits()
{ return m_pInherits; }
@@ -66,7 +60,7 @@ private:
void initializeInherits(OString const * pinherits);
NodeType m_nodeType;
- OString* m_pName;
+ std::unique_ptr<OString> m_pName;
AstDeclaration* m_pInherits;
std::vector< OString > m_typeParameters;
};
diff --git a/idlc/source/astdump.cxx b/idlc/source/astdump.cxx
index 945060bce392..7b869b7564dc 100644
--- a/idlc/source/astdump.cxx
+++ b/idlc/source/astdump.cxx
@@ -411,7 +411,7 @@ const sal_Char* AstSequence::getRelativName() const
{
if ( !m_pRelativName )
{
- m_pRelativName = new OString("[]");
+ m_pRelativName.reset( new OString("[]") );
AstDeclaration const * pType = resolveTypedefs( m_pMemberType );
*m_pRelativName += pType->getRelativName();
}