summaryrefslogtreecommitdiff
path: root/libreofficekit
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-06-18 12:30:40 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-09-29 12:43:37 +0200
commit1820fcbbc38e82daf43ebe759200050ce05b3fe1 (patch)
treef5a494e6a437971ef7b9ae003547d4b156bb8b13 /libreofficekit
parent66889d5219cec22bd0e654e5a812e90cdd04e59d (diff)
constmethod for accessor-type methods
Apply the constmethod plugin, but only to accessor-type methods, e.g. IsFoo(), GetBar(), etc, where we can be sure of that constifying is a reasonable thing to do. Change-Id: Ibc97f5f359a0992dd1ce2d66f0189f8a0a43d98a Reviewed-on: https://gerrit.libreoffice.org/74269 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'libreofficekit')
-rw-r--r--libreofficekit/source/gtk/lokdocview.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/libreofficekit/source/gtk/lokdocview.cxx b/libreofficekit/source/gtk/lokdocview.cxx
index 97a37b8557b8..f2b35617c952 100644
--- a/libreofficekit/source/gtk/lokdocview.cxx
+++ b/libreofficekit/source/gtk/lokdocview.cxx
@@ -1363,7 +1363,7 @@ callback (gpointer pData)
priv->m_aReferenceMarks.clear();
- for(auto& rMark : aTree.get_child("marks"))
+ for(const auto& rMark : aTree.get_child("marks"))
{
sal_uInt32 nColor = std::stoi(rMark.second.get<std::string>("color"), nullptr, 16);
std::string sRect = rMark.second.get<std::string>("rectangle");
@@ -1849,7 +1849,7 @@ renderOverlay(LOKDocView* pDocView, cairo_t* pCairo)
}
// Draw reference marks.
- for (auto& rPair : priv->m_aReferenceMarks)
+ for (const auto& rPair : priv->m_aReferenceMarks)
{
const ViewRectangle& rMark = rPair.first;
if (rMark.m_nPart != priv->m_nPartId)