From 8bc3799b354908f22270f9d96b2cce43ebd96d66 Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Wed, 10 Jul 2024 13:42:57 +0200 Subject: [PATCH] Fixup 145af7c2: remove unused method TextMetrics::firstVisible(), introduced in this commit, is actually unused. --- src/TextMetrics.cpp | 11 ----------- src/TextMetrics.h | 2 -- 2 files changed, 13 deletions(-) diff --git a/src/TextMetrics.cpp b/src/TextMetrics.cpp index a63adf5ebb..6ba15b0251 100644 --- a/src/TextMetrics.cpp +++ b/src/TextMetrics.cpp @@ -131,17 +131,6 @@ pair TextMetrics::first() const } -pair TextMetrics::firstVisible() const -{ - // This only works in the main text, I think (bottom > 0) - LASSERT(text_->isMainText(), return first()); - auto it = find_if(par_metrics_.begin(), par_metrics_.end(), - [] (ParMetricsCache::value_type const & p) { - return p.second.hasPosition() && p.second.bottom() > 0; - }); - return make_pair(it->first, &it->second); -} - pair TextMetrics::last() const { LBUFERR(!par_metrics_.empty()); diff --git a/src/TextMetrics.h b/src/TextMetrics.h index 1a19b42939..d5606b610a 100644 --- a/src/TextMetrics.h +++ b/src/TextMetrics.h @@ -50,8 +50,6 @@ public: /// std::pair first() const; /// - std::pair firstVisible() const; - /// std::pair last() const; /// is this row the last in the text? bool isLastRow(Row const & row) const; -- 2.39.2