X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FSession.cpp;h=3bb9c03a330005d0702de9f0d4f00246e4b971ae;hb=0fa93fe55a85e901215ea783e3baf2b465fb67bd;hp=394788381ee38bbc6d78a33912677cf02a99c2d3;hpb=58d22e0c6edab4cb68af63d3ccaafcb875be995d;p=lyx.git 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;