[Libreoffice-commits] core.git: sw/source

Miklos Vajna vmiklos at collabora.co.uk
Wed Nov 23 10:50:43 UTC 2016


 sw/source/filter/ww8/rtfexportfilter.cxx |    4 +---
 sw/source/filter/ww8/rtfstringbuffer.cxx |   15 +++++----------
 2 files changed, 6 insertions(+), 13 deletions(-)

New commits:
commit 6920eb20ae271b4f1cdbf574eb4beb8c796fcc6d
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Wed Nov 23 09:15:14 2016 +0100

    sw: clean up redundant initializers in rtfstringbuffer
    
    Change-Id: Ie4bb6689b3b9bdfcfaab1f1c9320792672fb847a
    Reviewed-on: https://gerrit.libreoffice.org/31107
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
    Tested-by: Jenkins <ci at libreoffice.org>

diff --git a/sw/source/filter/ww8/rtfexportfilter.cxx b/sw/source/filter/ww8/rtfexportfilter.cxx
index 34bdd46..8170723 100644
--- a/sw/source/filter/ww8/rtfexportfilter.cxx
+++ b/sw/source/filter/ww8/rtfexportfilter.cxx
@@ -36,9 +36,7 @@ RtfExportFilter::RtfExportFilter(const uno::Reference< uno::XComponentContext >&
 {
 }
 
-RtfExportFilter::~RtfExportFilter()
-{
-}
+RtfExportFilter::~RtfExportFilter() = default;
 
 sal_Bool RtfExportFilter::filter(const uno::Sequence< beans::PropertyValue >& aDescriptor) throw(uno::RuntimeException, std::exception)
 {
diff --git a/sw/source/filter/ww8/rtfstringbuffer.cxx b/sw/source/filter/ww8/rtfstringbuffer.cxx
index a8394d0..3d7cffc 100644
--- a/sw/source/filter/ww8/rtfstringbuffer.cxx
+++ b/sw/source/filter/ww8/rtfstringbuffer.cxx
@@ -10,15 +10,13 @@
 #include "rtfattributeoutput.hxx"
 
 RtfStringBufferValue::RtfStringBufferValue()
-    : m_aBuffer(),
-      m_pFlyFrameFormat(nullptr),
+    : m_pFlyFrameFormat(nullptr),
       m_pGrfNode(nullptr)
 {
 }
 
 RtfStringBufferValue::RtfStringBufferValue(const SwFlyFrameFormat* pFlyFrameFormat, const SwGrfNode* pGrfNode)
-    : m_aBuffer(),
-      m_pFlyFrameFormat(pFlyFrameFormat),
+    : m_pFlyFrameFormat(pFlyFrameFormat),
       m_pGrfNode(pGrfNode)
 {
 }
@@ -41,10 +39,7 @@ bool RtfStringBufferValue::isGraphic() const
     return m_pFlyFrameFormat != nullptr && m_pGrfNode != nullptr;
 }
 
-RtfStringBuffer::RtfStringBuffer()
-    : m_aValues()
-{
-}
+RtfStringBuffer::RtfStringBuffer() = default;
 
 sal_Int32 RtfStringBuffer::getLength() const
 {
@@ -73,7 +68,7 @@ OString RtfStringBuffer::makeStringAndClear()
 OStringBuffer& RtfStringBuffer::getLastBuffer()
 {
     if (m_aValues.empty() || m_aValues.back().isGraphic())
-        m_aValues.push_back(RtfStringBufferValue());
+        m_aValues.emplace_back(RtfStringBufferValue());
     return m_aValues.back().m_aBuffer;
 }
 
@@ -89,7 +84,7 @@ void RtfStringBuffer::clear()
 
 void RtfStringBuffer::append(const SwFlyFrameFormat* pFlyFrameFormat, const SwGrfNode* pGrfNode)
 {
-    m_aValues.push_back(RtfStringBufferValue(pFlyFrameFormat, pGrfNode));
+    m_aValues.emplace_back(RtfStringBufferValue(pFlyFrameFormat, pGrfNode));
 }
 
 void RtfStringBuffer::appendAndClear(RtfStringBuffer& rBuf)


More information about the Libreoffice-commits mailing list