diff options
| author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> | 2018-06-15 10:46:15 +0000 |
|---|---|---|
| committer | Marc Jeanmougin <marcjeanmougin@free.fr> | 2018-06-18 12:27:01 +0000 |
| commit | f4349fb3e45bd44cef0e2b69af4c9b4cf35dcf43 (patch) | |
| tree | 7c6044fd3a17a2665841959dac9b3b2110b27924 /src/widgets/sp-xmlview-content.cpp | |
| parent | Run clang-tidy’s modernize-use-override pass. (diff) | |
| download | inkscape-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/sp-xmlview-content.cpp')
| -rw-r--r-- | src/widgets/sp-xmlview-content.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/widgets/sp-xmlview-content.cpp b/src/widgets/sp-xmlview-content.cpp index 6e59ba3cd..6fc08c4ac 100644 --- a/src/widgets/sp-xmlview-content.cpp +++ b/src/widgets/sp-xmlview-content.cpp @@ -30,17 +30,17 @@ void sp_xmlview_content_changed (GtkTextBuffer *tb, SPXMLViewContent *text); static void event_content_changed (Inkscape::XML::Node * repr, const gchar * old_content, const gchar * new_content, gpointer data); static Inkscape::XML::NodeEventVector repr_events = { - NULL, /* child_added */ - NULL, /* child_removed */ - NULL, /* attr_changed */ + nullptr, /* child_added */ + nullptr, /* child_removed */ + nullptr, /* attr_changed */ event_content_changed, - NULL /* order_changed */ + nullptr /* order_changed */ }; GtkWidget *sp_xmlview_content_new(Inkscape::XML::Node * repr) { - GtkTextBuffer *tb = gtk_text_buffer_new(NULL); - SPXMLViewContent *text = SP_XMLVIEW_CONTENT(g_object_new(SP_TYPE_XMLVIEW_CONTENT, NULL)); + GtkTextBuffer *tb = gtk_text_buffer_new(nullptr); + SPXMLViewContent *text = SP_XMLVIEW_CONTENT(g_object_new(SP_TYPE_XMLVIEW_CONTENT, nullptr)); gtk_text_view_set_buffer (GTK_TEXT_VIEW (text), tb); gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (text), GTK_WRAP_CHAR); @@ -83,7 +83,7 @@ void sp_xmlview_content_class_init(SPXMLViewContentClass * klass) void sp_xmlview_content_init (SPXMLViewContent *text) { - text->repr = NULL; + text->repr = nullptr; text->blocked = FALSE; } @@ -91,7 +91,7 @@ void sp_xmlview_content_destroy(GtkWidget * object) { SPXMLViewContent * text = SP_XMLVIEW_CONTENT (object); - sp_xmlview_content_set_repr (text, NULL); + sp_xmlview_content_set_repr (text, nullptr); GTK_WIDGET_CLASS (sp_xmlview_content_parent_class)->destroy (object); } @@ -111,7 +111,7 @@ event_content_changed (Inkscape::XML::Node * /*repr*/, const gchar * /*old_conte } else { gtk_text_buffer_set_text (gtk_text_view_get_buffer (GTK_TEXT_VIEW (text)), "", 0); } - gtk_text_view_set_editable (GTK_TEXT_VIEW (text), new_content != NULL); + gtk_text_view_set_editable (GTK_TEXT_VIEW (text), new_content != nullptr); text->blocked = FALSE; } |
