[atkmm] C++11: Use of nullptr.



commit 3ddff197a05269e4316fc5f12e499b8b7a022b53
Author: Murray Cumming <murrayc murrayc com>
Date:   Fri Dec 9 13:53:22 2016 +0100

    C++11: Use of nullptr.

 atk/src/table.ccg |    4 ++--
 atk/src/text.ccg  |    6 +++---
 atk/src/value.ccg |    2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/atk/src/table.ccg b/atk/src/table.ccg
index b074c2b..01ee59e 100644
--- a/atk/src/table.ccg
+++ b/atk/src/table.ccg
@@ -27,7 +27,7 @@ namespace Atk
 
 Glib::ArrayHandle<int> Table::get_selected_columns() const
 {
-  int* selected = 0;
+  int* selected = nullptr;
   const int n_selected = atk_table_get_selected_columns(const_cast<AtkTable*>(gobj()), &selected);
 
   return Glib::ArrayHandle<int>(selected, n_selected, Glib::OWNERSHIP_SHALLOW);
@@ -35,7 +35,7 @@ Glib::ArrayHandle<int> Table::get_selected_columns() const
 
 Glib::ArrayHandle<int> Table::get_selected_rows() const
 {
-  int* selected = 0;
+  int* selected = nullptr;
   const int n_selected = atk_table_get_selected_rows(const_cast<AtkTable*>(gobj()), &selected);
 
   return Glib::ArrayHandle<int>(selected, n_selected, Glib::OWNERSHIP_SHALLOW);
diff --git a/atk/src/text.ccg b/atk/src/text.ccg
index 3c9b2f1..71bd9c7 100644
--- a/atk/src/text.ccg
+++ b/atk/src/text.ccg
@@ -37,8 +37,8 @@ namespace Atk
 
 Attribute::Attribute()
 {
-  gobject_.name  = 0;
-  gobject_.value = 0;
+  gobject_.name  = nullptr;
+  gobject_.value = nullptr;
 }
 
 Attribute::Attribute(const Glib::ustring& name, const Glib::ustring& value)
@@ -49,7 +49,7 @@ Attribute::Attribute(const Glib::ustring& name, const Glib::ustring& value)
 
 Attribute::Attribute(const AtkAttribute* gobject)
 {
-  g_return_if_fail(gobject != 0);
+  g_return_if_fail(gobject != nullptr);
 
   gobject_.name  = g_strdup(gobject->name);
   gobject_.value = g_strdup(gobject->value);
diff --git a/atk/src/value.ccg b/atk/src/value.ccg
index eb425fd..e848426 100644
--- a/atk/src/value.ccg
+++ b/atk/src/value.ccg
@@ -25,7 +25,7 @@ namespace Atk
 
 void Value::get_value_and_text(double& value, Glib::ustring& text)
 {
-  gchar* c_text = 0;
+  gchar* c_text = nullptr;
   atk_value_get_value_and_text(gobj(), &(value), &c_text);
   if (c_text) {
     text = c_text;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]