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/conn-avoid-ref.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/conn-avoid-ref.cpp')
| -rw-r--r-- | src/conn-avoid-ref.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/conn-avoid-ref.cpp b/src/conn-avoid-ref.cpp index c7254a449..d4b0ee50a 100644 --- a/src/conn-avoid-ref.cpp +++ b/src/conn-avoid-ref.cpp @@ -45,7 +45,7 @@ static Avoid::Polygon avoid_item_poly(SPItem const *item); SPAvoidRef::SPAvoidRef(SPItem *spitem) - : shapeRef(NULL) + : shapeRef(nullptr) , item(spitem) , setting(false) , new_setting(false) @@ -65,7 +65,7 @@ SPAvoidRef::~SPAvoidRef() if (shapeRef && router) { router->deleteShape(shapeRef); } - shapeRef = NULL; + shapeRef = nullptr; } @@ -83,7 +83,7 @@ void SPAvoidRef::setAvoid(char const *value) void SPAvoidRef::handleSettingChange(void) { SPDesktop *desktop = SP_ACTIVE_DESKTOP; - if (desktop == NULL) { + if (desktop == nullptr) { return; } if (desktop->getDocument() != item->document) { @@ -112,7 +112,7 @@ void SPAvoidRef::handleSettingChange(void) sigc::ptr_fun(&avoid_item_move)); char const *id = item->getAttribute("id"); - g_assert(id != NULL); + g_assert(id != nullptr); // Get a unique ID for the item. GQuark itemID = g_quark_from_string(id); @@ -125,7 +125,7 @@ void SPAvoidRef::handleSettingChange(void) g_assert(shapeRef); router->deleteShape(shapeRef); - shapeRef = NULL; + shapeRef = nullptr; } } @@ -142,7 +142,7 @@ std::vector<SPItem *> SPAvoidRef::getAttachedShapes(const unsigned int type) for (Avoid::IntList::iterator i = shapes.begin(); i != finish; ++i) { const gchar *connId = g_quark_to_string(*i); SPObject *obj = item->document->getObjectById(connId); - if (obj == NULL) { + if (obj == nullptr) { g_warning("getAttachedShapes: Object with id=\"%s\" is not " "found. Skipping.", connId); continue; @@ -166,7 +166,7 @@ std::vector<SPItem *> SPAvoidRef::getAttachedConnectors(const unsigned int type) for (Avoid::IntList::iterator i = conns.begin(); i != finish; ++i) { const gchar *connId = g_quark_to_string(*i); SPObject *obj = item->document->getObjectById(connId); - if (obj == NULL) { + if (obj == nullptr) { g_warning("getAttachedConnectors: Object with id=\"%s\" is not " "found. Skipping.", connId); continue; @@ -270,7 +270,7 @@ static std::vector<Geom::Point> approxItemWithPoints(SPItem const *item, const G static Avoid::Polygon avoid_item_poly(SPItem const *item) { SPDesktop *desktop = SP_ACTIVE_DESKTOP; - g_assert(desktop != NULL); + g_assert(desktop != nullptr); double spacing = desktop->namedview->connector_spacing; Geom::Affine itd_mat = item->i2doc_affine(); |
