From 584305799213c82f68d4d2eb172b812c74400487 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Lars=20Gullik=20Bj=C3=B8nnes?= Date: Fri, 7 Jan 2005 13:32:26 +0000 Subject: [PATCH] add specialization for unsigned long, and clean up header file git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9454 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/ChangeLog | 4 ++++ src/mathed/math_parser.C | 4 ++-- src/support/ChangeLog | 6 ++++++ src/support/convert.C | 9 +++++++++ src/support/convert.h | 30 +----------------------------- src/tex-accent.C | 2 ++ 6 files changed, 24 insertions(+), 31 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index a2194bcc5f..4e93267d40 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2005-01-07 Lars Gullik Bjonnes + + * tex-accent.C: add + 2005-01-06 José Matos * ParagraphParameters.C (write): put every parameter in its own line. diff --git a/src/mathed/math_parser.C b/src/mathed/math_parser.C index bb2730ea3d..4f1303362d 100644 --- a/src/mathed/math_parser.C +++ b/src/mathed/math_parser.C @@ -120,7 +120,7 @@ bool addRow(MathGridInset & grid, MathGridInset::row_type & cellrow, // one. // This does not happen in well formed .lyx files, // but LyX versions 1.3.x and older could create - // such files and tex2lyx can still do that. + // such files and tex2lyx can still do that. --cellrow; lyxerr << "ignoring extra row"; if (!vskip.empty()) @@ -151,7 +151,7 @@ bool addCol(MathGridInset & grid, MathGridInset::col_type & cellcol) // one. // This does not happen in well formed .lyx files, // but LyX versions 1.3.x and older could create - // such files and tex2lyx can still do that. + // such files and tex2lyx can still do that. --cellcol; lyxerr << "ignoring extra column." << endl; return false; diff --git a/src/support/ChangeLog b/src/support/ChangeLog index cadf806b9a..784c42fb70 100644 --- a/src/support/ChangeLog +++ b/src/support/ChangeLog @@ -1,3 +1,9 @@ +2005-01-07 Lars Gullik Bjonnes + + * convert.h: remove the specializations, dont included unneeded + headers + * convert.C: add specialization for unsigned long + 2005-01-06 Lars Gullik Bjonnes * tostr.[Ch]: renamed to convert[ch] diff --git a/src/support/convert.C b/src/support/convert.C index b0eaa99c4a..d785c3fe20 100644 --- a/src/support/convert.C +++ b/src/support/convert.C @@ -15,6 +15,8 @@ #include +#include + using boost::lexical_cast; using std::string; @@ -55,6 +57,13 @@ string convert(unsigned int ui) } +template<> +string convert(unsigned long ul) +{ + return lexical_cast(ul); +} + + template<> string convert(float f) { diff --git a/src/support/convert.h b/src/support/convert.h index 22d5f12a8b..da1947b843 100644 --- a/src/support/convert.h +++ b/src/support/convert.h @@ -16,12 +16,9 @@ #ifndef CONVERT_H #define CONVERT_H +#if 0 #include -#include - - -#if 0 // Commented out since BOOST_STATIC_ASSERT does not work with gcc 4.0 template Target convert(Source arg) @@ -36,29 +33,4 @@ template Target convert(Source arg); #endif - -template<> -std::string convert(bool); - -template<> -std::string convert(char); - -template<> -std::string convert(unsigned short); - -template<> -std::string convert(int); - -template<> -std::string convert(unsigned int); - -template<> -std::string convert(float); - -template<> -std::string convert(double); - -template<> -std::string convert(std::string); - #endif diff --git a/src/tex-accent.C b/src/tex-accent.C index e2f1a8319b..ddfa1a7dfb 100644 --- a/src/tex-accent.C +++ b/src/tex-accent.C @@ -14,6 +14,8 @@ #include "tex-accent.h" #include "support/convert.h" +#include + using std::string; /* the names used by TeX and XWindows for deadkeys/accents are not the same -- 2.39.2