Squash some warnings.

This commit is contained in:
Richard Heck 2016-07-02 14:12:34 -04:00
parent edbc91a6f9
commit bc1672f6a0
3 changed files with 7 additions and 5 deletions

View File

@ -558,8 +558,8 @@ void Change::paintCue(PainterInfo & pi, double const x1, double const y,
return; return;
// Calculate 1/3 height of font // Calculate 1/3 height of font
FontMetrics const & fm = theFontMetrics(font); FontMetrics const & fm = theFontMetrics(font);
int const y_bar = deleted() ? y - fm.maxAscent() / 3 int const y_bar = int(deleted() ? y - fm.maxAscent() / 3
: y + 2 * pi.base.solidLineOffset() + pi.base.solidLineThickness(); : y + 2 * pi.base.solidLineOffset() + pi.base.solidLineThickness());
pi.pain.line(int(x1), y_bar, int(x2), y_bar, color(), pi.pain.line(int(x1), y_bar, int(x2), y_bar, color(),
Painter::line_solid, pi.base.solidLineThickness()); Painter::line_solid, pi.base.solidLineThickness());
} }
@ -588,7 +588,8 @@ void Change::paintCue(PainterInfo & pi, double const x1, double const y1,
y = y1; y = y1;
break; break;
} }
pi.pain.line(x1, y2, x2, y, color(), Painter::line_solid, pi.pain.line(int(x1), int(y2), int(x2), int(y),
color(), Painter::line_solid,
pi.base.solidLineThickness()); pi.base.solidLineThickness());
} }

View File

@ -204,7 +204,8 @@ void RowPainter::paintMisspelledMark(Row::Element const & e) const
if (x1 > x2) if (x1 > x2)
swap(x1, x2); swap(x1, x2);
pi_.pain.line(x_ + x1, y, x_ + x2, y, Color_error, pi_.pain.line(int(x_ + x1), y, int(x_ + x2), y,
Color_error,
Painter::line_onoffdash, thickness); Painter::line_onoffdash, thickness);
pos = range.last + 1; pos = range.last + 1;
} }

View File

@ -302,7 +302,7 @@ docstring InsetCaption::xhtml(XHTMLStream & xs, OutputParams const & rp) const
string const our_class = "float-caption-" + type_; string const our_class = "float-caption-" + type_;
size_t const loc = attr.find("class='"); size_t const loc = attr.find("class='");
if (loc != string::npos) if (loc != string::npos)
attr.insert(loc + 7, our_class+ " "); attr.insert(loc + 7, our_class + " ");
else else
attr = attr + " class='" + our_class + "'"; attr = attr + " class='" + our_class + "'";
} }