summaryrefslogtreecommitdiffstats
path: root/src/widgets/spw-utilities.cpp
diff options
context:
space:
mode:
authorEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2018-06-15 10:46:15 +0000
committerMarc Jeanmougin <marcjeanmougin@free.fr>2018-06-18 12:27:01 +0000
commitf4349fb3e45bd44cef0e2b69af4c9b4cf35dcf43 (patch)
tree7c6044fd3a17a2665841959dac9b3b2110b27924 /src/widgets/spw-utilities.cpp
parentRun clang-tidy’s modernize-use-override pass. (diff)
downloadinkscape-f4349fb3e45bd44cef0e2b69af4c9b4cf35dcf43.tar.gz
inkscape-f4349fb3e45bd44cef0e2b69af4c9b4cf35dcf43.zip
Run clang-tidy’s modernize-use-nullptr pass.
This replaces all NULL or 0 with nullptr when assigned to or returned as a pointer.
Diffstat (limited to 'src/widgets/spw-utilities.cpp')
-rw-r--r--src/widgets/spw-utilities.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/widgets/spw-utilities.cpp b/src/widgets/spw-utilities.cpp
index 992f1f6b7..0dc041f80 100644
--- a/src/widgets/spw-utilities.cpp
+++ b/src/widgets/spw-utilities.cpp
@@ -32,8 +32,8 @@
Gtk::Label * spw_label(Gtk::Grid *table, const gchar *label_text, int col, int row, Gtk::Widget* target)
{
Gtk::Label *label_widget = new Gtk::Label();
- g_assert(label_widget != NULL);
- if (target != NULL)
+ g_assert(label_widget != nullptr);
+ if (target != nullptr)
{
label_widget->set_text_with_mnemonic(label_text);
label_widget->set_mnemonic_widget(*target);
@@ -69,7 +69,7 @@ Gtk::HBox * spw_hbox(Gtk::Grid * table, int width, int col, int row)
{
/* Create a new hbox with a 4-pixel spacing between children */
Gtk::HBox *hb = new Gtk::HBox(false, 4);
- g_assert(hb != NULL);
+ g_assert(hb != nullptr);
hb->show();
hb->set_hexpand();
hb->set_halign(Gtk::ALIGN_FILL);
@@ -94,7 +94,7 @@ sp_set_font_size_recursive (GtkWidget *w, gpointer font)
gtk_css_provider_load_from_data(css_provider,
css_data.str().c_str(),
- -1, NULL);
+ -1, nullptr);
auto style_context = gtk_widget_get_style_context(w);
gtk_style_context_add_provider(style_context,
@@ -128,7 +128,7 @@ sp_set_font_size_smaller (GtkWidget *w)
*/
gpointer sp_search_by_data_recursive(GtkWidget *w, gpointer key)
{
- gpointer r = NULL;
+ gpointer r = nullptr;
if (w && G_IS_OBJECT(w)) {
r = g_object_get_data(G_OBJECT(w), (gchar *) key);
@@ -143,7 +143,7 @@ gpointer sp_search_by_data_recursive(GtkWidget *w, gpointer key)
}
}
- return NULL;
+ return nullptr;
}
/**
@@ -151,7 +151,7 @@ gpointer sp_search_by_data_recursive(GtkWidget *w, gpointer key)
*/
GtkWidget *sp_search_by_value_recursive(GtkWidget *w, gchar *key, gchar *value)
{
- gchar *r = NULL;
+ gchar *r = nullptr;
if (w && G_IS_OBJECT(w)) {
r = (gchar *) g_object_get_data(G_OBJECT(w), key);
@@ -166,7 +166,7 @@ GtkWidget *sp_search_by_value_recursive(GtkWidget *w, gchar *key, gchar *value)
}
}
- return NULL;
+ return nullptr;
}
/*