From a6fd43692d0bbcaf4d0e07c9fda023b4cd718a86 Mon Sep 17 00:00:00 2001 From: Lubos Dolezel Date: Tue, 28 Jul 2015 20:39:29 +0200 Subject: Crash fixes --- src/sys_settings.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/sys_settings.cpp') diff --git a/src/sys_settings.cpp b/src/sys_settings.cpp index 2a669e4..f4f2849 100644 --- a/src/sys_settings.cpp +++ b/src/sys_settings.cpp @@ -195,10 +195,10 @@ t_win_geometry::t_win_geometry(const string &value) { vector v = split(value, ','); if (v.size() == 4) { - x = atoi(v[0].c_str()); - y = atoi(v[1].c_str()); - width = atoi(v[2].c_str()); - height = atoi(v[3].c_str()); + x = std::stoi(v[0]); + y = std::stoi(v[1]); + width = std::stoi(v[2]); + height = std::stoi(v[3]); } } @@ -1126,8 +1126,8 @@ string t_sys_settings::get_product_date(void) const { vector l = split(PRODUCT_DATE, ' '); assert(l.size() == 3); t.tm_mon = str2month_full(l[0]); - t.tm_mday = atoi(l[1].c_str()); - t.tm_year = atoi(l[2].c_str()) - 1900; + t.tm_mday = std::stoi(l[1]); + t.tm_year = std::stoi(l[2]) - 1900; char buf[64]; strftime(buf, 64, "%d %B %Y", &t); -- cgit v1.2.3