From f4349fb3e45bd44cef0e2b69af4c9b4cf35dcf43 Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Fri, 15 Jun 2018 12:46:15 +0200 Subject: =?UTF-8?q?Run=20clang-tidy=E2=80=99s=20modernize-use-nullptr=20pa?= =?UTF-8?q?ss.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This replaces all NULL or 0 with nullptr when assigned to or returned as a pointer. --- src/widgets/sp-attribute-widget.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src/widgets/sp-attribute-widget.cpp') diff --git a/src/widgets/sp-attribute-widget.cpp b/src/widgets/sp-attribute-widget.cpp index d89e6296c..043eb93cc 100644 --- a/src/widgets/sp-attribute-widget.cpp +++ b/src/widgets/sp-attribute-widget.cpp @@ -65,9 +65,9 @@ static void sp_attribute_table_object_release (SPObject */*object*/, SPAttribute SPAttributeTable::SPAttributeTable () : - _object(NULL), + _object(nullptr), blocked(false), - table(NULL), + table(nullptr), _attributes(), _entries(), modified_connection(), @@ -76,9 +76,9 @@ SPAttributeTable::SPAttributeTable () : } SPAttributeTable::SPAttributeTable (SPObject *object, std::vector &labels, std::vector &attributes, GtkWidget* parent) : - _object(NULL), + _object(nullptr), blocked(false), - table(NULL), + table(nullptr), _attributes(), _entries(), modified_connection(), @@ -101,7 +101,7 @@ void SPAttributeTable::clear(void) { Gtk::Widget *w = ch[i]; ch.pop_back(); - if (w != NULL) + if (w != nullptr) { try { @@ -118,14 +118,14 @@ void SPAttributeTable::clear(void) _entries.clear(); delete table; - table = NULL; + table = nullptr; } if (_object) { modified_connection.disconnect(); release_connection.disconnect(); - _object = NULL; + _object = nullptr; } } @@ -151,7 +151,7 @@ void SPAttributeTable::set_object(SPObject *object, // Create table table = new Gtk::Grid(); - if (!(parent == NULL)) + if (!(parent == nullptr)) gtk_container_add(GTK_CONTAINER(parent), (GtkWidget*)table->gobj()); // Fill rows @@ -208,7 +208,7 @@ void SPAttributeTable::change_object(SPObject *object) { modified_connection.disconnect(); release_connection.disconnect(); - _object = NULL; + _object = nullptr; } _object = object; @@ -295,7 +295,7 @@ static void sp_attribute_table_object_release (SPObject */*object*/, SPAttribute { std::vector labels; std::vector attributes; - spat->set_object (NULL, labels, attributes, NULL); + spat->set_object (nullptr, labels, attributes, nullptr); } /* -- cgit v1.2.3