[gtkmm] C++11: TreeView: Use std::stod() instead of std::strtod().
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkmm] C++11: TreeView: Use std::stod() instead of std::strtod().
- Date: Tue, 1 Sep 2015 10:54:50 +0000 (UTC)
commit fcc0f358d17264f8956567a33471a6b52c2fc0d1
Author: Murray Cumming <murrayc murrayc com>
Date: Tue Sep 1 12:51:21 2015 +0200
C++11: TreeView: Use std::stod() instead of std::strtod().
This also removes a using std::strtod() that really should not be in a header.
gtk/src/treeview.hg | 7 +------
1 files changed, 1 insertions(+), 6 deletions(-)
---
diff --git a/gtk/src/treeview.hg b/gtk/src/treeview.hg
index d6fad5a..1c671f5 100644
--- a/gtk/src/treeview.hg
+++ b/gtk/src/treeview.hg
@@ -34,10 +34,6 @@ _CONFIGINCLUDE(gtkmmconfig.h)
_DEFS(gtkmm,gtk)
_PINCLUDE(gtkmm/private/container_p.h)
-#include <cstdlib>
-
-using std::strtod;
-
namespace Gtk
{
@@ -1183,8 +1179,7 @@ void _auto_store_on_cellrenderer_text_edited_numerical(const Glib::ustring& path
//new_value << astream; //Get it out of the stream as the numerical type.
//Convert the text to a number, using the same logic used by GtkCellRendererText when it stores
numbers.
- char* pchEnd = nullptr;
- ColumnType new_value = static_cast<ColumnType>( strtod(new_text.c_str(), &pchEnd) );
+ auto new_value = static_cast<ColumnType>( std::stod(new_text) );
//Store the user's new text in the model:
Gtk::TreeRow row = *iter;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]