From b1e4a117675dcccd131f16555e676e27f60ac71e Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Thu, 9 Jan 2025 15:26:11 +0100 Subject: [PATCH] Get rid of BufferView::parMetrics() This was used only once. --- src/BufferView.cpp | 7 ------- src/BufferView.h | 3 --- src/Cursor.cpp | 2 +- 3 files changed, 1 insertion(+), 11 deletions(-) diff --git a/src/BufferView.cpp b/src/BufferView.cpp index 2def0484fd..c1afd76a5e 100644 --- a/src/BufferView.cpp +++ b/src/BufferView.cpp @@ -2985,13 +2985,6 @@ TextMetrics & BufferView::textMetrics(Text const * t) } -ParagraphMetrics const & BufferView::parMetrics(Text const * t, - pit_type pit) const -{ - return textMetrics(t).parMetrics(pit); -} - - int BufferView::workHeight() const { return height_; diff --git a/src/BufferView.h b/src/BufferView.h index 9099278128..d0248b901e 100644 --- a/src/BufferView.h +++ b/src/BufferView.h @@ -45,7 +45,6 @@ class InsetMathNest; class Length; class MathData; class MathRow; -class ParagraphMetrics; class Point; class Text; class TextMetrics; @@ -322,8 +321,6 @@ public: /// TextMetrics const & textMetrics(Text const * t) const; TextMetrics & textMetrics(Text const * t); - /// - ParagraphMetrics const & parMetrics(Text const *, pit_type) const; /// CoordCache & coordCache(); diff --git a/src/Cursor.cpp b/src/Cursor.cpp index be49141c99..d9c7b0a73c 100644 --- a/src/Cursor.cpp +++ b/src/Cursor.cpp @@ -980,7 +980,7 @@ void Cursor::getPos(int & x, int & y) const Row const & Cursor::textRow() const { CursorSlice const & cs = innerTextSlice(); - ParagraphMetrics const & pm = bv().parMetrics(cs.text(), cs.pit()); + ParagraphMetrics const & pm = bv().textMetrics(cs.text()).parMetrics(cs.pit()); return pm.getRow(pos(), boundary()); }