From: Jean-Marc Lasgouttes Date: Wed, 6 Nov 2019 09:36:21 +0000 (+0100) Subject: Constify and un-constify X-Git-Tag: lyx-2.4.0dev-acb2ca7b~1471 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=2a2019d77e936e46c1ae8f49142bd1ad89aef2d3;p=features.git Constify and un-constify --- 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;