summaryrefslogtreecommitdiffstats
path: root/src/main-cmdlineact.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-cmdlineact.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-cmdlineact.cpp')
-rw-r--r--src/main-cmdlineact.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/main-cmdlineact.cpp b/src/main-cmdlineact.cpp
index 4c4cf5f9a..6b97616dd 100644
--- a/src/main-cmdlineact.cpp
+++ b/src/main-cmdlineact.cpp
@@ -28,8 +28,8 @@ namespace Inkscape {
std::list <CmdLineAction *> CmdLineAction::_list;
-CmdLineAction::CmdLineAction (bool isVerb, gchar const * arg) : _isVerb(isVerb), _arg(NULL) {
- if (arg != NULL) {
+CmdLineAction::CmdLineAction (bool isVerb, gchar const * arg) : _isVerb(isVerb), _arg(nullptr) {
+ if (arg != nullptr) {
_arg = g_strdup(arg);
}
@@ -39,7 +39,7 @@ CmdLineAction::CmdLineAction (bool isVerb, gchar const * arg) : _isVerb(isVerb),
}
CmdLineAction::~CmdLineAction () {
- if (_arg != NULL) {
+ if (_arg != nullptr) {
g_free(_arg);
}
}
@@ -66,18 +66,18 @@ CmdLineAction::doIt (ActionContext const & context) {
}
Inkscape::Verb * verb = Inkscape::Verb::getbyid(_arg);
- if (verb == NULL) {
+ if (verb == nullptr) {
printf(_("Unable to find verb ID '%s' specified on the command line.\n"), _arg);
return;
}
SPAction * action = verb->get_action(context);
- sp_action_perform(action, NULL);
+ sp_action_perform(action, nullptr);
} else {
- if (context.getDocument() == NULL || context.getSelection() == NULL) { return; }
+ if (context.getDocument() == nullptr || context.getSelection() == nullptr) { return; }
SPDocument * doc = context.getDocument();
SPObject * obj = doc->getObjectById(_arg);
- if (obj == NULL) {
+ if (obj == nullptr) {
printf(_("Unable to find node ID: '%s'\n"), _arg);
return;
}