From 2a2019d77e936e46c1ae8f49142bd1ad89aef2d3 Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Wed, 6 Nov 2019 10:36:21 +0100 Subject: [PATCH] Constify and un-constify --- src/Session.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Session.cpp b/src/Session.cpp index 394788381e..3bb9c03a33 100644 --- a/src/Session.cpp +++ b/src/Session.cpp @@ -221,7 +221,7 @@ void LastFilePosSection::save(FilePos const & pos) { // Remove element if it was already present. Iterating should // not be a problem since the list is small (<100 elements). - for (FilePosList::const_iterator it = lastfilepos.begin(); + for (FilePosList::iterator it = lastfilepos.begin(); it != lastfilepos.end(); ++it) if (it->file == pos.file) { lastfilepos.erase(it); @@ -235,7 +235,7 @@ void LastFilePosSection::save(FilePos const & pos) LastFilePosSection::FilePos LastFilePosSection::load(FileName const & fname) const { - for (auto & fp : lastfilepos) + for (auto const & fp : lastfilepos) if (fp.file == fname) // Has position information, return it. return fp; -- 2.39.2