commit b48d5bda175a72a4e2b7b24024b3ba0289fcea31
Author: Jean-Marc Lasgouttes <[email protected]>
Date: Sun Jul 13 20:53:40 2025 +0200
Rename Row::add specialisations to addInset and addChar
Reusing the same add() method makes the code less easy to read.
No change intended.
---
src/Row.cpp | 8 ++++----
src/Row.h | 8 ++++----
src/TextMetrics.cpp | 6 +++---
3 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/src/Row.cpp b/src/Row.cpp
index 2e89434924..83c2329294 100644
--- a/src/Row.cpp
+++ b/src/Row.cpp
@@ -522,8 +522,8 @@ void Row::finalizeLast()
}
-void Row::add(pos_type const pos, Inset const * ins,
- Font const & f, Change const & ch)
+void Row::addInset(pos_type const pos, Inset const * ins,
+ Font const & f, Change const & ch)
{
finalizeLast();
Element e(INSET, pos, f, ch);
@@ -534,8 +534,8 @@ void Row::add(pos_type const pos, Inset const * ins,
}
-void Row::add(pos_type const pos, char_type const c,
- Font const & f, Change const & ch)
+void Row::addChar(pos_type const pos, char_type const c,
+ Font const & f, Change const & ch)
{
if (!sameString(f, ch)) {
finalizeLast();
diff --git a/src/Row.h b/src/Row.h
index 997163303a..c38286dd80 100644
--- a/src/Row.h
+++ b/src/Row.h
@@ -276,11 +276,11 @@ public:
double pos2x(pos_type const pos, bool const boundary) const;
///
- void add(pos_type pos, Inset const * ins,
- Font const & f, Change const & ch);
+ void addInset(pos_type pos, Inset const * ins,
+ Font const & f, Change const & ch);
///
- void add(pos_type pos, char_type const c,
- Font const & f, Change const & ch);
+ void addChar(pos_type pos, char_type const c,
+ Font const & f, Change const & ch);
///
void addVirtual(pos_type pos, docstring const & s,
Font const & f, Change const & ch);
diff --git a/src/TextMetrics.cpp b/src/TextMetrics.cpp
index 045c2e9ae3..5d8241b9d2 100644
--- a/src/TextMetrics.cpp
+++ b/src/TextMetrics.cpp
@@ -904,7 +904,7 @@ Row TextMetrics::tokenizeParagraph(pit_type const pit) const
// The most special cases are handled first.
if (par.isInset(i)) {
Inset const * ins = par.getInset(i);
- row.add(i, ins, *fi, par.lookupChange(i));
+ row.addInset(i, ins, *fi, par.lookupChange(i));
} else if (c == ' ' && i + 1 == body_pos) {
// This space is an \item separator. Represent it with a
// special space element, which dimension will be
computed
@@ -930,10 +930,10 @@ Row TextMetrics::tokenizeParagraph(pit_type const pit)
const
// ⤶ U+2936 ARROW POINTING DOWNWARDS THEN CURVING
LEFTWARDS
// ¶ U+00B6 PILCROW SIGN
char_type const screen_char = (c == 0x2028) ? 0x2936 :
0x00B6;
- row.add(i, screen_char, *fi, par.lookupChange(i));
+ row.addChar(i, screen_char, *fi, par.lookupChange(i));
} else
// row elements before body are unbreakable
- row.add(i, c, *fi, par.lookupChange(i));
+ row.addChar(i, c, *fi, par.lookupChange(i));
// add inline completion width
// draw logically behind the previous character
--
lyx-cvs mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-cvs