From c8974fe9d3aaa43bd76360490c0d7fd1bbe36671 Mon Sep 17 00:00:00 2001 From: Angus Leeming Date: Tue, 15 Feb 2005 09:50:49 +0000 Subject: [PATCH] Squash a couple of MSVC warnings about "truncation of constant value". git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9629 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/insets/ChangeLog | 5 +++++ src/insets/insetlatexaccent.C | 16 ++++++++++------ 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/src/insets/ChangeLog b/src/insets/ChangeLog index e4f9d42fa0..39254ffbf6 100644 --- a/src/insets/ChangeLog +++ b/src/insets/ChangeLog @@ -1,3 +1,8 @@ +2005-02-14 Angus Leeming + + * insetlatexaccent.C (draw): squash a couple of MSVC warnings + about "truncation of constant value". + 2005-02-08 Georg Baum * insetgraphics.C (latex): Remove line continuation '%\n' (bug xxx, diff --git a/src/insets/insetlatexaccent.C b/src/insets/insetlatexaccent.C index dbf861a610..98f7ab9111 100644 --- a/src/insets/insetlatexaccent.C +++ b/src/insets/insetlatexaccent.C @@ -422,15 +422,19 @@ void InsetLatexAccent::draw(PainterInfo & pi, int x, int baseline) const drawAccent(pi, x2, baseline, '~'); break; - case UNDERBAR: // underbar 0x5F - pi.pain.text(x2 - font_metrics::center(0x5F, font), baseline, - char(0x5F), font); + case UNDERBAR: { + char const underbar(0x5F); + pi.pain.text(x2 - font_metrics::center(underbar, font), + baseline, underbar, font); break; + } - case CEDILLA: - pi.pain.text(x2 - font_metrics::center(0xB8, font), baseline, - char(0xB8), font); + case CEDILLA: { + char const cedilla(0xB8); + pi.pain.text(x2 - font_metrics::center(cedilla, font), + baseline, cedilla, font); break; + } case UNDERDOT: pi.pain.text(x2 - font_metrics::center('.', font),