diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-05-12 00:57:51 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-05-12 00:57:51 +0100 |
| commit | df085fc0ea4f1a3f009de5a7a5bf9f241173bcba (patch) | |
| tree | 597ff1fe90446aa684e5fede3a72217b0b5c3d1a /src/lib/update.cc | |
| parent | 1b576d63f5b5babda35c3995dd375e39baa16947 (diff) | |
Remove LocaleGuard and lexical_cast<> in favour of libdcp::raw_convert,
which should get things right with both decimal and thousands
separators; LocaleGuard fixed decimal separators ok but not, it appears,
thousands ones.
Diffstat (limited to 'src/lib/update.cc')
| -rw-r--r-- | src/lib/update.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/lib/update.cc b/src/lib/update.cc index a98ee5b5d..34eaf385c 100644 --- a/src/lib/update.cc +++ b/src/lib/update.cc @@ -22,6 +22,7 @@ #include <boost/algorithm/string.hpp> #include <curl/curl.h> #include <libcxml/cxml.h> +#include <libdcp/raw_convert.h> #include "update.h" #include "version.h" #include "ui_signaller.h" @@ -32,7 +33,7 @@ using std::cout; using std::min; using std::string; using std::stringstream; -using boost::lexical_cast; +using libdcp::raw_convert; UpdateChecker* UpdateChecker::_instance = 0; @@ -120,12 +121,12 @@ UpdateChecker::thread () current_pre = true; } - float current_float = lexical_cast<float> (current); + float current_float = raw_convert<float> (current); if (current_pre) { current_float -= 0.005; } - if (current_float < lexical_cast<float> (_stable)) { + if (current_float < raw_convert<float> (_stable)) { set_state (YES); } else { set_state (NO); |
