summaryrefslogtreecommitdiffstats
path: root/src/main-cmdlinexact.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/main-cmdlinexact.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/main-cmdlinexact.cpp')
-rw-r--r--src/main-cmdlinexact.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/main-cmdlinexact.cpp b/src/main-cmdlinexact.cpp
index fe4d52220..a407d3c0e 100644
--- a/src/main-cmdlinexact.cpp
+++ b/src/main-cmdlinexact.cpp
@@ -143,12 +143,12 @@ void xFileOpen( const Glib::ustring &uri )
Inkscape::DocumentUndo::clearUndo(old_document);
}
- SPDocument *doc = NULL;
- Inkscape::Extension::Extension *key = NULL;
+ SPDocument *doc = nullptr;
+ Inkscape::Extension::Extension *key = nullptr;
try {
doc = Inkscape::Extension::open(key, document_filename.c_str());
} catch (std::exception &e) {
- doc = NULL;
+ doc = nullptr;
std::string exeption_mgs = e.what();
printf("Error: open %s:%s\n",document_filename.c_str(), exeption_mgs.c_str() );
fflush(stdout);
@@ -240,12 +240,12 @@ void xFileExportPNG( Inkscape::ActionContext const & context, const Glib::ustrin
ExportResult status = sp_export_png_file(doc, document_filename.c_str(),
Geom::Rect(Geom::Point(0,0), Geom::Point(width, height)), png_width, png_height, dpi, dpi,
- nv->pagecolor, 0, 0, TRUE);
+ nv->pagecolor, nullptr, nullptr, TRUE);
}
void xSelectElement( Inkscape::ActionContext const & context, const Glib::ustring &element_name )
{
- if (context.getDocument() == NULL || context.getSelection() == NULL) {
+ if (context.getDocument() == nullptr || context.getSelection() == nullptr) {
return;
}
@@ -257,7 +257,7 @@ void xSelectElement( Inkscape::ActionContext const & context, const Glib::ustrin
SPDocument * doc = context.getDocument();
SPObject * obj = doc->getObjectById(element_name);
- if (obj == NULL) {
+ if (obj == nullptr) {
printf(_("Unable to find node ID: '%s'\n"), element_name.c_str());
fflush(stdout);
return;
@@ -326,7 +326,7 @@ parseVerbsYAMLFile(gchar const *yaml_filename)
verbs_list_t verbs_list;
FILE *fh = g_fopen(yaml_filename, "r");
- if(fh == NULL) {
+ if(fh == nullptr) {
printf("Failed to read from file %s\n", yaml_filename);
fflush(stdout);
@@ -555,7 +555,7 @@ CmdLineXAction::createActionsFromYAML( gchar const *yaml_filename )
++undo_counter;
new CmdLineAction(true, verb.args[0].c_str());
}
- else if( Verb::getbyid(verb.args[0].c_str()) != NULL )
+ else if( Verb::getbyid(verb.args[0].c_str()) != nullptr )
{
++undo_counter;
new CmdLineAction(true, verb.args[0].c_str());