attached some more unused stuff
one thing: msvc complained about boundary below not being referenced.
removing the false in the if got rid of the warning. am not sure if i
understand what it was doing there (and didn't try to grasp the if
either) ...
@@ -1073,7 +1069,7 @@
bool boundary = cur.boundary();
bool updateNeeded = setCursor(cur, cur.pit(), cur.pos() - 1, true,
false);
if (!checkAndActivateInset(cur, false)) {
- if (false && !boundary &&
+ if (!boundary &&
bidi.isBoundary(cur.buffer(), cur.paragraph(),
cur.pos() + 1))
updateNeeded |=
setCursor(cur, cur.pit(), cur.pos() +
1, true, true);
Abdelrazak Younes wrote:
Peter Kümmel wrote:
Abdelrazak Younes wrote:
Edwin Leuven wrote:
could it be that the attached are trailin... ?
Yes, you're right, please commit. It's a pity that MSVC doesn't detect
unused variables...
Because you compile with warning level 3.
Now you can't forget it :)
I've marked the relevant warnings as error for level 3 and 4.
(also have a look at the new cmake output.)
Looks good, I'll check it out.
Thanks,
Abdel.
Index: BufferView.C
===================================================================
--- BufferView.C (revision 16440)
+++ BufferView.C (working copy)
@@ -577,7 +577,6 @@
CursorSlice & bot = cursor_.bottom();
TextMetrics & tm = text_metrics_[bot.text()];
pit_type const pit = bot.pit();
- int max_width = workWidth();
tm.redoParagraph(pit);
ParagraphMetrics const & pm = tm.parMetrics(pit);
anchor_ref_ = pit;
Index: rowpainter.C
===================================================================
--- rowpainter.C (revision 16440)
+++ rowpainter.C (working copy)
@@ -138,8 +138,6 @@
erased_(pi.erased_),
xo_(x), yo_(y), width_(text_metrics_.width())
{
- Buffer const & buffer = *bv_.buffer();
- int const right_margin = text_metrics_.rightMargin(pm_);
RowMetrics m = text_metrics_.computeRowMetrics(pit_, row_);
x_ = m.x + xo_;
Index: text2.C
===================================================================
--- text2.C (revision 16440)
+++ text2.C (working copy)
@@ -759,7 +759,6 @@
TextMetrics const & tm = bv.textMetrics(this);
int const xo = bv.coordCache().get(this, pit).x_;
x -= xo;
- int max_witdh = tm.maxWidth();
RowMetrics const r = tm.computeRowMetrics(pit, row);
Paragraph const & par = pars_[pit];
@@ -910,7 +909,6 @@
TextMetrics & tm = bv.textMetrics(this);
ParagraphMetrics const & pm = tm.parMetrics(it->first);
- int max_width = tm.maxWidth();
// If we are off-screen (before the visible part)
if (y < 0
@@ -972,7 +970,6 @@
Row const & LyXText::getRowNearY(BufferView const & bv, int y, pit_type pit)
const
{
- Paragraph const & par = pars_[pit];
ParagraphMetrics const & pm = bv.parMetrics(this, pit);
int yy = bv.coordCache().get(this, pit).y_ - pm.ascent();
@@ -1002,7 +999,6 @@
TextMetrics const & tm = cur.bv().textMetrics(this);
ParagraphMetrics const & pm = tm.parMetrics(pit);
- Buffer const & buffer = cur.buffer();
int right_margin = tm.rightMargin(pm);
int xx = x; // is modified by getColumnNearX
pos_type const pos = row.pos()
@@ -1073,7 +1069,7 @@
bool boundary = cur.boundary();
bool updateNeeded = setCursor(cur, cur.pit(), cur.pos() - 1,
true, false);
if (!checkAndActivateInset(cur, false)) {
- if (false && !boundary &&
+ if (!boundary &&
bidi.isBoundary(cur.buffer(), cur.paragraph(),
cur.pos() + 1))
updateNeeded |=
setCursor(cur, cur.pit(), cur.pos() +
1, true, true);
@@ -1126,7 +1122,6 @@
// Tell BufferView to test for FitCursor in any case!
cur.updateFlags(Update::FitCursor);
- Paragraph const & par = cur.paragraph();
ParagraphMetrics const & pm = cur.bv().parMetrics(this, cur.pit());
int row;
@@ -1181,7 +1176,6 @@
// Tell BufferView to test for FitCursor in any case!
cur.updateFlags(Update::FitCursor);
- Paragraph const & par = cur.paragraph();
ParagraphMetrics const & pm = cur.bv().parMetrics(this, cur.pit());
int row;
Index: text3.C
===================================================================
--- text3.C (revision 16440)
+++ text3.C (working copy)
@@ -207,7 +207,8 @@
int x = cur.x_target();
// FIXME: there would maybe a need for this 'updated' boolean in the
future...
- bool updated = setCursorFromCoordinates(cur, x, 0);
+ //bool updated = setCursorFromCoordinates(cur, x, 0);
+ setCursorFromCoordinates(cur, x, 0);
cur.dispatch(FuncRequest(cur.selection()? LFUN_UP_SELECT: LFUN_UP));
if (cpar == cur.pit() && cpos == cur.pos())
@@ -227,7 +228,8 @@
int x = cur.x_target();
// FIXME: there would maybe a need for this 'updated' boolean in the
future...
- bool updated = setCursorFromCoordinates(cur, x, cur.bv().workHeight() -
1);
+ //bool updated = setCursorFromCoordinates(cur, x, cur.bv().workHeight()
- 1);
+ setCursorFromCoordinates(cur, x, cur.bv().workHeight() - 1);
cur.dispatch(FuncRequest(cur.selection()? LFUN_DOWN_SELECT: LFUN_DOWN));
if (cpar == cur.pit() && cpos == cur.pos())