diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-11-23 09:15:14 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-11-23 10:50:19 +0000 |
commit | 6920eb20ae271b4f1cdbf574eb4beb8c796fcc6d (patch) | |
tree | 99970da66648f66699f01815714f00d03c651aa0 | |
parent | f6d2ff1cb7f0f4917a0d4df38d5dcff8e37d20cc (diff) |
sw: clean up redundant initializers in rtfstringbuffer
Change-Id: Ie4bb6689b3b9bdfcfaab1f1c9320792672fb847a
Reviewed-on: https://gerrit.libreoffice.org/31107
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
-rw-r--r-- | sw/source/filter/ww8/rtfexportfilter.cxx | 4 | ||||
-rw-r--r-- | sw/source/filter/ww8/rtfstringbuffer.cxx | 15 |
2 files changed, 6 insertions, 13 deletions
diff --git a/sw/source/filter/ww8/rtfexportfilter.cxx b/sw/source/filter/ww8/rtfexportfilter.cxx index 34bdd46ed466..81707231c7d2 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 a8394d03dd2c..3d7cffc76a7d 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) |