]> git.lyx.org Git - features.git/commit
Use swap in InsetText::updateBuffer for notes ad friends
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Sat, 21 Jul 2018 21:58:47 +0000 (23:58 +0200)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Sun, 22 Jul 2018 10:35:05 +0000 (12:35 +0200)
commit05d3a649521e0e8524209ae9deae75c30ff01e93
treea4a82df0d4995a790187523e81475ed79f3329d1
parent4549f46a431021d6667451ab83965eca12d58f58
Use swap in InsetText::updateBuffer for notes ad friends

Avoid as much as possible to do full copies of all counters, since
that can be exensive. Unfortunately, it is just posible when we want
to restore the saved counters.

Explanations why we use friend swap is here:
https://stackoverflow.com/questions/5695548/public-friend-swap-member-function

Part of bug #5973.
src/Counters.cpp
src/Counters.h
src/insets/InsetText.cpp