diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2023-08-05 15:43:57 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2023-08-05 15:43:57 +0100 |
commit | c70948134af3be3239b2fc1e08d1226ded3a2cdf (patch) | |
tree | d1a663de75ff7141b976bea7db3590f47feeb810 | |
parent | Use faster std::from_chars over boost::lexical_cast for XML numeric parse (diff) | |
download | slicer-c70948134af3be3239b2fc1e08d1226ded3a2cdf.tar.bz2 slicer-c70948134af3be3239b2fc1e08d1226ded3a2cdf.tar.xz slicer-c70948134af3be3239b2fc1e08d1226ded3a2cdf.zip |
Use Glib::ustring::format over boost::lexical_cast for XML numeric format
-rw-r--r-- | slicer/xml/serializer.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/slicer/xml/serializer.cpp b/slicer/xml/serializer.cpp index 56cdbaa..7494c6e 100644 --- a/slicer/xml/serializer.cpp +++ b/slicer/xml/serializer.cpp @@ -1,5 +1,4 @@ #include "serializer.h" -#include <boost/lexical_cast.hpp> #include <charconv> #include <compileTimeFormatter.h> #include <functional> @@ -157,37 +156,37 @@ namespace Slicer { void get(const Ice::Byte & value) const override { - apply(boost::lexical_cast<Glib::ustring, int>(value)); + apply(Glib::ustring::format(value)); } void get(const Ice::Short & value) const override { - apply(boost::lexical_cast<Glib::ustring>(value)); + apply(Glib::ustring::format(value)); } void get(const Ice::Int & value) const override { - apply(boost::lexical_cast<Glib::ustring>(value)); + apply(Glib::ustring::format(value)); } void get(const Ice::Long & value) const override { - apply(boost::lexical_cast<Glib::ustring>(value)); + apply(Glib::ustring::format(value)); } void get(const Ice::Float & value) const override { - apply(boost::lexical_cast<Glib::ustring>(value)); + apply(Glib::ustring::format(value)); } void get(const Ice::Double & value) const override { - apply(boost::lexical_cast<Glib::ustring>(value)); + apply(Glib::ustring::format(value)); } void |