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/selcue.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/selcue.cpp')
| -rw-r--r-- | src/selcue.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/selcue.cpp b/src/selcue.cpp index 8ef3aa03a..375156412 100644 --- a/src/selcue.cpp +++ b/src/selcue.cpp @@ -87,7 +87,7 @@ void Inkscape::SelCue::_updateItemBboxes(Inkscape::Preferences *prefs) return; } - g_return_if_fail(_selection != NULL); + g_return_if_fail(_selection != nullptr); int prefs_bbox = prefs->getBool("/tools/bounding_box"); @@ -142,7 +142,7 @@ void Inkscape::SelCue::_newItemBboxes() return; } - g_return_if_fail(_selection != NULL); + g_return_if_fail(_selection != nullptr); int prefs_bbox = prefs->getBool("/tools/bounding_box"); @@ -153,7 +153,7 @@ void Inkscape::SelCue::_newItemBboxes() Geom::OptRect const b = (prefs_bbox == 0) ? item->desktopVisualBounds() : item->desktopGeometricBounds(); - SPCanvasItem* box = NULL; + SPCanvasItem* box = nullptr; if (b) { if (mode == MARK) { @@ -175,7 +175,7 @@ void Inkscape::SelCue::_newItemBboxes() } else if (mode == BBOX) { box = sp_canvas_item_new(_desktop->getControls(), SP_TYPE_CTRLRECT, - NULL); + nullptr); SP_CTRLRECT(box)->setRectangle(*b); SP_CTRLRECT(box)->setColor(0x000000a0, 0, 0); @@ -205,10 +205,10 @@ void Inkscape::SelCue::_newTextBaselines() for (auto l=ll.begin();l!=ll.end();++l) { SPItem *item = *l; - SPCanvasItem* baseline_point = NULL; + SPCanvasItem* baseline_point = nullptr; if (SP_IS_TEXT(item) || SP_IS_FLOWTEXT(item)) { // visualize baseline Inkscape::Text::Layout const *layout = te_get_layout(item); - if (layout != NULL && layout->outputExists()) { + if (layout != nullptr && layout->outputExists()) { boost::optional<Geom::Point> pt = layout->baselineAnchorPoint(); if (pt) { baseline_point = sp_canvas_item_new(_desktop->getControls(), SP_TYPE_CTRL, @@ -240,7 +240,7 @@ void Inkscape::SelCue::_boundingBoxPrefsChanged(int prefs_bbox) return; } - g_return_if_fail(_selection != NULL); + g_return_if_fail(_selection != nullptr); _updateItemBboxes(mode, prefs_bbox); } |
