]> git.lyx.org Git - lyx.git/blobdiff - src/undo.C
code cosmetics to the iterator fix
[lyx.git] / src / undo.C
index d5d34c0c4a6fbf1c63986375a4f42e82b4abcd41..8e5fcc334f9acb23e249bba86f12a1268faf09db 100644 (file)
@@ -187,10 +187,10 @@ bool textUndoOrRedo(BufferView & bv,
 
                // this ugly stuff is needed until we get rid of the
                // inset_owner backpointer
-               ParagraphList::const_iterator pit = undo.pars.begin();
-               ParagraphList::const_iterator end = undo.pars.end();
+               ParagraphList::iterator pit = undo.pars.begin();
+               ParagraphList::iterator const end = undo.pars.end();
                for (; pit != end; ++pit)
-                       const_cast<Paragraph &>(*pit).setInsetOwner(&dit.inset());
+                       pit->setInsetOwner(dit.realInset());
                plist.insert(first, undo.pars.begin(), undo.pars.end());
        }