From 2c64f8a50305cda8d80284c489e96ed479139b81 Mon Sep 17 00:00:00 2001 From: Angus Leeming Date: Tue, 1 Apr 2003 10:07:08 +0000 Subject: [PATCH] Get rid of the static_casts; thanks Lars. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6668 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/bufferview_funcs.C | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/src/bufferview_funcs.C b/src/bufferview_funcs.C index 0afd78ff67..caf3a78d49 100644 --- a/src/bufferview_funcs.C +++ b/src/bufferview_funcs.C @@ -87,34 +87,26 @@ bool string2font(string const & data, LyXFont & font, bool & toggle) if (token == "family") { int const next = lex.getInteger(); - LyXFont::FONT_FAMILY const family = - static_cast(next); - font.setFamily(family); + font.setFamily(LyXFont::FONT_FAMILY(next)); } else if (token == "series") { int const next = lex.getInteger(); - LyXFont::FONT_SERIES const series = - static_cast(next); - font.setSeries(series); + font.setSeries(LyXFont::FONT_SERIES(next)); } else if (token == "shape") { int const next = lex.getInteger(); - LyXFont::FONT_SHAPE const shape = - static_cast(next); - font.setShape(shape); + font.setShape(LyXFont::FONT_SHAPE(next)); } else if (token == "size") { int const next = lex.getInteger(); - LyXFont::FONT_SIZE const size = - static_cast(next); - font.setSize(size); + font.setSize(LyXFont::FONT_SIZE(next)); } else if (token == "emph" || token == "underbar" || token == "noun" || token == "number") { int const next = lex.getInteger(); LyXFont::FONT_MISC_STATE const misc = - static_cast(next); + LyXFont::FONT_MISC_STATE(next); if (token == "emph") font.setEmph(misc); @@ -127,9 +119,7 @@ bool string2font(string const & data, LyXFont & font, bool & toggle) } else if (token == "color") { int const next = lex.getInteger(); - LColor::color const color = - static_cast(next); - font.setColor(color); + font.setColor(LColor::color(next)); } else if (token == "language") { string const next = lex.getString();