]> git.lyx.org Git - features.git/commitdiff
Squash a couple of MSVC warnings about "truncation of constant value".
authorAngus Leeming <leeming@lyx.org>
Tue, 15 Feb 2005 09:50:49 +0000 (09:50 +0000)
committerAngus Leeming <leeming@lyx.org>
Tue, 15 Feb 2005 09:50:49 +0000 (09:50 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9629 a592a061-630c-0410-9148-cb99ea01b6c8

src/insets/ChangeLog
src/insets/insetlatexaccent.C

index e4f9d42fa093e11216fead1aa468c5648898d3b4..39254ffbf6c21a98774d93b50695f22c90ac6676 100644 (file)
@@ -1,3 +1,8 @@
+2005-02-14  Angus Leeming  <leeming@lyx.org>
+
+       * insetlatexaccent.C (draw): squash a couple of MSVC warnings
+       about "truncation of constant value".
+
 2005-02-08  Georg Baum  <Georg.Baum@post.rwth-aachen.de>
 
        * insetgraphics.C (latex): Remove line continuation '%\n' (bug xxx,
index dbf861a610746b4ad138f93b019158ac1af17842..98f7ab91118c1a89490b3e119186d92371f63818 100644 (file)
@@ -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),