]> git.lyx.org Git - lyx.git/blobdiff - src/support/tostr.C
* lyxfunctional.h: delete compare_memfun and helper classes
[lyx.git] / src / support / tostr.C
index 94f461fd63c60051781fbc60da0dad71f9df2acc..d490413f849c261e7991b317df684d36c7acf09c 100644 (file)
@@ -1,7 +1,22 @@
+/**
+ * \file tostr.C
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
+ *
+ * \author André Pönitz
+ * \author Lars Gullik Bjønnes
+ *
+ * Full author contact details are available in file CREDITS.
+ */
+
 #include <config.h>
-#include "Lsstream.h"
-#include "LString.h"
+
+#include <boost/lexical_cast.hpp>
+
+
+using boost::lexical_cast;
+
+using std::string;
 
 
 string const tostr(bool b)
@@ -12,33 +27,25 @@ string const tostr(bool b)
 
 string const tostr(unsigned int i)
 {
-       ostringstream os;
-       os << i;
-       return STRCONV(os.str());
+       return lexical_cast<string>(i);
 }
 
 
 string const tostr(long int i)
 {
-       ostringstream os;
-       os << i;
-       return STRCONV(os.str());
+       return lexical_cast<string>(i);
 }
 
 
 string const tostr(double d)
 {
-       ostringstream os;
-       os << d;
-       return STRCONV(os.str());
+       return lexical_cast<string>(d);
 }
 
 
 string const tostr(int i)
 {
-       ostringstream os;
-       os << i;
-       return STRCONV(os.str());
+       return lexical_cast<string>(i);
 }
 
 
@@ -46,4 +53,9 @@ string const tostr(string const & s)
 {
        return s;
 }
+
+
+string const tostr(long unsigned int i)
+{
+       return lexical_cast<string>(i);
+}