[Libreoffice-commits] core.git: sw/source
Miklos Vajna (via logerrit)
logerrit at kemper.freedesktop.org
Mon Oct 7 10:15:22 UTC 2019
sw/source/core/txtnode/txtedt.cxx | 2 +-
sw/source/filter/ww8/docxattributeoutput.cxx | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
New commits:
commit e424a2b0ee0b1ca438832efe4feb23a1aef38ba7
Author: Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Mon Oct 7 12:03:17 2019 +0200
Commit: Miklos Vajna <vmiklos at collabora.com>
CommitDate: Mon Oct 7 12:14:37 2019 +0200
sw: fix Android build
/home/vmiklos/git/libreoffice/master-android/sw/source/core/txtnode/txtedt.cxx:1203:41: error: loop variable 'rImplicitChange' has type 'const std::pair<int, int> &' but is initialized with type 'std::__ndk1::pair<long, long>' resulting in a copy [-Werror,-Wrange-loop-analysis]
Just use auto, the copy that was happening here was not intentional.
Change-Id: I2f98519f7891bd52ccf560ba0707ad8eef415e06
Reviewed-on: https://gerrit.libreoffice.org/80364
Reviewed-by: Miklos Vajna <vmiklos at collabora.com>
Tested-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/sw/source/core/txtnode/txtedt.cxx b/sw/source/core/txtnode/txtedt.cxx
index 05ee2e75b40b..5c599d78afab 100644
--- a/sw/source/core/txtnode/txtedt.cxx
+++ b/sw/source/core/txtnode/txtedt.cxx
@@ -1200,7 +1200,7 @@ bool SwTextNode::Convert( SwConversionArgs &rArgs )
} while (!bFound && aIter.Next()); /* loop while nothing was found and still sth is left to be searched */
// Apply implicit changes, if any, now that aIter is no longer used
- for (const std::pair<int,int> & rImplicitChange : aImplicitChanges)
+ for (const auto& rImplicitChange : aImplicitChanges)
{
SwPaM aPaM( *this, rImplicitChange.first );
aPaM.SetMark();
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index eec9e5039519..27b3bb1a4c62 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -7263,7 +7263,7 @@ void DocxAttributeOutput::WritePostitFieldReference()
void DocxAttributeOutput::WritePostitFields()
{
- for (const std::pair<const SwPostItField*,int> & rPair : m_postitFields)
+ for (const auto& rPair : m_postitFields)
{
OString idstr = OString::number( rPair.second);
const SwPostItField* f = rPair.first;
More information about the Libreoffice-commits
mailing list