From: Carl Hetherington Date: Wed, 29 Apr 2020 19:49:17 +0000 (+0200) Subject: Use raw_convert rather than lexical_cast. X-Git-Tag: v2.15.67~6 X-Git-Url: https://main.carlh.net/gitweb/?p=dcpomatic.git;a=commitdiff_plain;h=fc18b92ca1cc8d7ec975fddc507fb97aacc6d17f Use raw_convert rather than lexical_cast. --- diff --git a/src/wx/timecode.h b/src/wx/timecode.h index 18508847b..bf658ba83 100644 --- a/src/wx/timecode.h +++ b/src/wx/timecode.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2013-2016 Carl Hetherington + Copyright (C) 2013-2020 Carl Hetherington This file is part of DCP-o-matic. @@ -23,9 +23,9 @@ #include "wx_util.h" #include "lib/types.h" +#include #include #include -#include class TimecodeBase : public wxPanel { @@ -73,10 +73,10 @@ public: int f; t.split (fps, h, m, s, f); - checked_set (_hours, boost::lexical_cast (h)); - checked_set (_minutes, boost::lexical_cast (m)); - checked_set (_seconds, boost::lexical_cast (s)); - checked_set (_frames, boost::lexical_cast (f)); + checked_set (_hours, dcp::raw_convert(h)); + checked_set (_minutes, dcp::raw_convert(m)); + checked_set (_seconds, dcp::raw_convert(s)); + checked_set (_frames, dcp::raw_convert(f)); checked_set (_fixed, t.timecode (fps)); } @@ -85,13 +85,13 @@ public: { T t; std::string const h = wx_to_std (_hours->GetValue ()); - t += T::from_seconds (boost::lexical_cast (h.empty() ? "0" : h) * 3600); + t += T::from_seconds (dcp::raw_convert(h.empty() ? "0" : h) * 3600); std::string const m = wx_to_std (_minutes->GetValue()); - t += T::from_seconds (boost::lexical_cast (m.empty() ? "0" : m) * 60); + t += T::from_seconds (dcp::raw_convert(m.empty() ? "0" : m) * 60); std::string const s = wx_to_std (_seconds->GetValue()); - t += T::from_seconds (boost::lexical_cast (s.empty() ? "0" : s)); + t += T::from_seconds (dcp::raw_convert(s.empty() ? "0" : s)); std::string const f = wx_to_std (_frames->GetValue()); - t += T::from_seconds (boost::lexical_cast (f.empty() ? "0" : f) / fps); + t += T::from_seconds (dcp::raw_convert(f.empty() ? "0" : f) / fps); return t; }