From: Jean-Marc Lasgouttes Date: Mon, 7 Nov 2022 23:06:18 +0000 (+0100) Subject: Fix expensive thinko: operator++ returns a reference, not a copy X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=ec151de2cc530a9118517ac9299e30c17cb62255;p=features.git Fix expensive thinko: operator++ returns a reference, not a copy This accounts for 45% of the row breaking time on the (huge) paragraph of the MWE in bug #12598. Fixes part of bug #12598. --- diff --git a/src/TextMetrics.cpp b/src/TextMetrics.cpp index 00fb217c0a..f58efa794b 100644 --- a/src/TextMetrics.cpp +++ b/src/TextMetrics.cpp @@ -979,7 +979,7 @@ class flexible_const_iterator { public: // - flexible_const_iterator operator++() { + flexible_const_iterator & operator++() { if (pile_.empty()) ++cit_; else