]> git.lyx.org Git - features.git/commit
Get rid of lyx::next uses for RandomAccessList
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Mon, 11 May 2020 10:31:25 +0000 (12:31 +0200)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Tue, 12 May 2020 15:29:21 +0000 (17:29 +0200)
commit6d97e3993489a23aea79f899f156fd2f6e21cc4d
tree331d87e791581868df1ba91749faebc502fc30b6
parent3eb56006b5eb9e478ac6bb8f0c5a15cc347e54ec
Get rid of lyx::next uses for RandomAccessList

These uses are inefficient (a loop really) and require that pit_type
is ptrdiff_t.

Instead, RandomAccesslist::constIterator is renamed to iterator_at and
a version adding a non-const iterator is added.

lyx::next and lyx::prev are removed, and std::prev is used in the few
places where the code requires it (for no good reason IMO).
src/Compare.cpp
src/CutAndPaste.cpp
src/Text.cpp
src/Text2.cpp
src/Text3.cpp
src/output_docbook.cpp
src/output_latex.cpp
src/output_xhtml.cpp
src/support/RandomAccessList.h
src/support/lyxalgo.h