summaryrefslogtreecommitdiff
path: root/sax
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2018-02-20 16:03:20 +0100
committerStephan Bergmann <sbergman@redhat.com>2018-02-21 08:09:46 +0100
commitba8a70365ef459c967cd8a71a6d48ca53dd341bd (patch)
tree397ae034cac2f06ea40ed550a7ce39cf4a42966e /sax
parent0adb36835bcbe55bdf2717556a98e51f1873b19f (diff)
New loplugin:nestedunnamed
Change-Id: Ifb434589ef08428ce609bc7a40b015d4df13224c Reviewed-on: https://gerrit.libreoffice.org/50048 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sax')
-rw-r--r--sax/source/expatwrap/sax_expat.cxx35
1 files changed, 16 insertions, 19 deletions
diff --git a/sax/source/expatwrap/sax_expat.cxx b/sax/source/expatwrap/sax_expat.cxx
index 0dd3afdf7ebb..49f9471b7b03 100644
--- a/sax/source/expatwrap/sax_expat.cxx
+++ b/sax/source/expatwrap/sax_expat.cxx
@@ -384,27 +384,24 @@ SaxExpatParser::initialize(css::uno::Sequence< css::uno::Any > const& rArguments
}
}
-namespace
+class ParserCleanup
{
- class ParserCleanup
+private:
+ SaxExpatParser_Impl& m_rParser;
+ Entity& m_rEntity;
+public:
+ ParserCleanup(SaxExpatParser_Impl& rParser, Entity& rEntity)
+ : m_rParser(rParser)
+ , m_rEntity(rEntity)
{
- private:
- SaxExpatParser_Impl& m_rParser;
- Entity& m_rEntity;
- public:
- ParserCleanup(SaxExpatParser_Impl& rParser, Entity& rEntity)
- : m_rParser(rParser)
- , m_rEntity(rEntity)
- {
- }
- ~ParserCleanup()
- {
- m_rParser.popEntity();
- //XML_ParserFree accepts a null arg
- XML_ParserFree(m_rEntity.pParser);
- }
- };
-}
+ }
+ ~ParserCleanup()
+ {
+ m_rParser.popEntity();
+ //XML_ParserFree accepts a null arg
+ XML_ParserFree(m_rEntity.pParser);
+ }
+};
/***************
*