]> git.lyx.org Git - lyx.git/blobdiff - src/iterators.C
last Friday's text*.C -> text_func shuffle
[lyx.git] / src / iterators.C
index 5865272ff1c020977787b2558d28ed7d1639bce8..d7b0d74ed28d941dd48c342431820d6839ec276c 100644 (file)
@@ -47,7 +47,7 @@ public:
 ParPosition::ParPosition(ParagraphList::iterator p, ParagraphList const & pl)
        : pit(p), plist(&pl)
 {
-       if (p != pl.end()) {
+       if (p != const_cast<ParagraphList&>(pl).end()) {
                it.reset(p->insetlist.begin());
        }
 }
@@ -129,7 +129,7 @@ ParIterator & ParIterator::operator++()
                }
 
                // Try to go to the next paragarph
-               if (next(p.pit) != p.plist->end()
+               if (next(p.pit) != const_cast<ParagraphList*>(p.plist)->end()
                    || pimpl_->positions.size() == 1) {
                        ++p.pit;
                        p.index.reset();
@@ -253,7 +253,7 @@ ParConstIterator & ParConstIterator::operator++()
                }
 
                // Try to go to the next paragarph
-               if (next(p.pit) != p.plist->end()
+               if (next(p.pit) != const_cast<ParagraphList*>(p.plist)->end()
                    || pimpl_->positions.size() == 1) {
                        ++p.pit;
                        p.index.reset();