summaryrefslogtreecommitdiffstats
path: root/src/live_effects
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/live_effects
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/live_effects')
-rw-r--r--src/live_effects/effect.cpp28
-rw-r--r--src/live_effects/lpe-bendpath.cpp6
-rw-r--r--src/live_effects/lpe-bool.cpp2
-rw-r--r--src/live_effects/lpe-bspline.cpp4
-rw-r--r--src/live_effects/lpe-clone-original.cpp12
-rw-r--r--src/live_effects/lpe-copy_rotate.cpp16
-rw-r--r--src/live_effects/lpe-embrodery-stitch-ordering.cpp26
-rw-r--r--src/live_effects/lpe-embrodery-stitch-ordering.h10
-rw-r--r--src/live_effects/lpe-fill-between-many.cpp4
-rw-r--r--src/live_effects/lpe-fill-between-strokes.cpp2
-rw-r--r--src/live_effects/lpe-fillet-chamfer.cpp8
-rw-r--r--src/live_effects/lpe-knot.cpp2
-rw-r--r--src/live_effects/lpe-lattice2.cpp2
-rw-r--r--src/live_effects/lpe-measure-segments.cpp52
-rw-r--r--src/live_effects/lpe-mirror_symmetry.cpp14
-rw-r--r--src/live_effects/lpe-offset.cpp8
-rw-r--r--src/live_effects/lpe-patternalongpath.cpp6
-rw-r--r--src/live_effects/lpe-perspective-envelope.cpp2
-rw-r--r--src/live_effects/lpe-perspective_path.cpp16
-rw-r--r--src/live_effects/lpe-powerclip.cpp16
-rw-r--r--src/live_effects/lpe-powermask.cpp16
-rw-r--r--src/live_effects/lpe-powerstroke.cpp4
-rw-r--r--src/live_effects/lpe-roughen.cpp2
-rw-r--r--src/live_effects/lpe-ruler.cpp4
-rw-r--r--src/live_effects/lpe-show_handles.cpp2
-rw-r--r--src/live_effects/lpe-simplify.cpp2
-rw-r--r--src/live_effects/lpe-tangent_to_curve.cpp6
-rw-r--r--src/live_effects/lpe-taperstroke.cpp4
-rw-r--r--src/live_effects/lpeobject-reference.cpp16
-rw-r--r--src/live_effects/lpeobject.cpp20
-rw-r--r--src/live_effects/parameter/array.cpp2
-rw-r--r--src/live_effects/parameter/array.h4
-rw-r--r--src/live_effects/parameter/bool.cpp2
-rw-r--r--src/live_effects/parameter/colorpicker.cpp2
-rw-r--r--src/live_effects/parameter/hidden.cpp2
-rw-r--r--src/live_effects/parameter/item.cpp6
-rw-r--r--src/live_effects/parameter/message.cpp2
-rw-r--r--src/live_effects/parameter/originalitem.cpp2
-rw-r--r--src/live_effects/parameter/originalitem.h2
-rw-r--r--src/live_effects/parameter/originalitemarray.cpp6
-rw-r--r--src/live_effects/parameter/originalitemarray.h2
-rw-r--r--src/live_effects/parameter/originalpath.cpp6
-rw-r--r--src/live_effects/parameter/originalpath.h2
-rw-r--r--src/live_effects/parameter/originalpatharray.cpp12
-rw-r--r--src/live_effects/parameter/originalpatharray.h2
-rw-r--r--src/live_effects/parameter/parameter.cpp2
-rw-r--r--src/live_effects/parameter/path.cpp18
-rw-r--r--src/live_effects/parameter/point.cpp6
-rw-r--r--src/live_effects/parameter/point.h2
-rw-r--r--src/live_effects/parameter/powerstrokepointarray.cpp4
-rw-r--r--src/live_effects/parameter/satellitesarray.cpp6
-rw-r--r--src/live_effects/parameter/satellitesarray.h4
-rw-r--r--src/live_effects/parameter/text.h4
-rw-r--r--src/live_effects/parameter/togglebutton.cpp6
-rw-r--r--src/live_effects/parameter/togglebutton.h4
-rw-r--r--src/live_effects/parameter/vector.cpp4
56 files changed, 213 insertions, 213 deletions
diff --git a/src/live_effects/effect.cpp b/src/live_effects/effect.cpp
index 1e691eb4d..bef7a1e3f 100644
--- a/src/live_effects/effect.cpp
+++ b/src/live_effects/effect.cpp
@@ -181,7 +181,7 @@ Effect::acceptsNumClicks(EffectType type) {
Effect*
Effect::New(EffectType lpenr, LivePathEffectObject *lpeobj)
{
- Effect* neweffect = NULL;
+ Effect* neweffect = nullptr;
switch (lpenr) {
case EMBRODERY_STITCH:
neweffect = static_cast<Effect*> ( new LPEEmbroderyStitch(lpeobj) );
@@ -353,7 +353,7 @@ Effect::New(EffectType lpenr, LivePathEffectObject *lpeobj)
break;
default:
g_warning("LivePathEffect::Effect::New called with invalid patheffect type (%d)", lpenr);
- neweffect = NULL;
+ neweffect = nullptr;
break;
}
@@ -371,7 +371,7 @@ void Effect::createAndApply(const char* name, SPDocument *doc, SPItem *item)
Inkscape::XML::Node *repr = xml_doc->createElement("inkscape:path-effect");
repr->setAttribute("effect", name);
- doc->getDefs()->getRepr()->addChild(repr, NULL); // adds to <defs> and assigns the 'id' attribute
+ doc->getDefs()->getRepr()->addChild(repr, nullptr); // adds to <defs> and assigns the 'id' attribute
const gchar * repr_id = repr->attribute("id");
Inkscape::GC::release(repr);
@@ -396,10 +396,10 @@ Effect::Effect(LivePathEffectObject *lpeobject)
is_load(true),
lpeobj(lpeobject),
concatenate_before_pwd2(false),
- sp_lpe_item(NULL),
+ sp_lpe_item(nullptr),
current_zoom(1),
upd_params(true),
- current_shape(NULL),
+ current_shape(nullptr),
provides_own_flash_paths(true), // is automatically set to false if providesOwnFlashPaths() is not overridden
defaultsopen(false),
is_ready(false) // is automatically set to false if providesOwnFlashPaths() is not overridden
@@ -480,7 +480,7 @@ Effect::processObjects(LPEAction lpe_action)
if (id.empty()) {
return;
}
- SPObject *elemref = NULL;
+ SPObject *elemref = nullptr;
if ((elemref = document->getObjectById(id.c_str()))) {
Inkscape::XML::Node * elemnode = elemref->getRepr();
std::vector<SPItem*> item_list;
@@ -498,7 +498,7 @@ Effect::processObjects(LPEAction lpe_action)
if (elemnode->attribute("inkscape:path-effect")) {
sp_item_list_to_curves(item_list, item_selected, item_to_select);
}
- elemnode->setAttribute("sodipodi:insensitive", NULL);
+ elemnode->setAttribute("sodipodi:insensitive", nullptr);
SP_ITEM(elemref)->moveTo(SP_ITEM(sp_lpe_item), false);
}
break;
@@ -513,7 +513,7 @@ Effect::processObjects(LPEAction lpe_action)
if (!this->isVisible()/* && std::strcmp(elemref->getId(),sp_lpe_item->getId()) != 0*/) {
css->setAttribute("display", "none");
} else {
- css->setAttribute("display", NULL);
+ css->setAttribute("display", nullptr);
}
sp_repr_css_write_string(css,css_str);
elemnode->setAttribute("style", css_str.c_str());
@@ -876,7 +876,7 @@ Effect::defaultParamSet()
vboxwidg->set_margin_top(5);
return vboxwidg;
} else {
- return NULL;
+ return nullptr;
}
}
@@ -921,7 +921,7 @@ Inkscape::XML::Node *Effect::getRepr()
SPDocument *Effect::getSPDoc()
{
- if (lpeobj->document == NULL) {
+ if (lpeobj->document == nullptr) {
g_message("Effect::getSPDoc() returns NULL");
}
return lpeobj->document;
@@ -932,7 +932,7 @@ Effect::getParameter(const char * key)
{
Glib::ustring stringkey(key);
- if (param_vector.empty()) return NULL;
+ if (param_vector.empty()) return nullptr;
std::vector<Parameter *>::iterator it = param_vector.begin();
while (it != param_vector.end()) {
Parameter * param = *it;
@@ -943,14 +943,14 @@ Effect::getParameter(const char * key)
++it;
}
- return NULL;
+ return nullptr;
}
Parameter *
Effect::getNextOncanvasEditableParam()
{
if (param_vector.size() == 0) // no parameters
- return NULL;
+ return nullptr;
oncanvasedit_it++;
if (oncanvasedit_it >= static_cast<int>(param_vector.size())) {
@@ -970,7 +970,7 @@ Effect::getNextOncanvasEditableParam()
}
} while (oncanvasedit_it != old_it); // iterate until complete loop through map has been made
- return NULL;
+ return nullptr;
}
void
diff --git a/src/live_effects/lpe-bendpath.cpp b/src/live_effects/lpe-bendpath.cpp
index 7b739256e..69415cf4e 100644
--- a/src/live_effects/lpe-bendpath.cpp
+++ b/src/live_effects/lpe-bendpath.cpp
@@ -46,7 +46,7 @@ class KnotHolderEntityWidthBendPath : public LPEKnotHolderEntity {
~KnotHolderEntityWidthBendPath() override
{
LPEBendPath *lpe = dynamic_cast<LPEBendPath *> (_effect);
- lpe->_knot_entity = NULL;
+ lpe->_knot_entity = nullptr;
}
void knot_set(Geom::Point const &p, Geom::Point const &origin, guint state) override;
Geom::Point knot_get() const override;
@@ -71,7 +71,7 @@ LPEBendPath::LPEBendPath(LivePathEffectObject *lpeobject) :
prop_scale.param_set_digits(3);
prop_scale.param_set_increments(0.01, 0.10);
- _knot_entity = NULL;
+ _knot_entity = nullptr;
_provides_knotholder_entities = true;
apply_to_clippath_and_mask = true;
concatenate_before_pwd2 = true;
@@ -182,7 +182,7 @@ void
LPEBendPath::addKnotHolderEntities(KnotHolder *knotholder, SPItem *item)
{
_knot_entity = new BeP::KnotHolderEntityWidthBendPath(this);
- _knot_entity->create(NULL, item, knotholder, Inkscape::CTRL_TYPE_UNKNOWN, _("Change the width"), SP_KNOT_SHAPE_CIRCLE);
+ _knot_entity->create(nullptr, item, knotholder, Inkscape::CTRL_TYPE_UNKNOWN, _("Change the width"), SP_KNOT_SHAPE_CIRCLE);
knotholder->add(_knot_entity);
if (hide_knot) {
_knot_entity->knot->hide();
diff --git a/src/live_effects/lpe-bool.cpp b/src/live_effects/lpe-bool.cpp
index 01b019cec..865968b30 100644
--- a/src/live_effects/lpe-bool.cpp
+++ b/src/live_effects/lpe-bool.cpp
@@ -344,7 +344,7 @@ sp_pathvector_boolop_remove_inner(Geom::PathVector const &pathva, fill_typ fra)
static fill_typ GetFillTyp(SPItem *item)
{
SPCSSAttr *css = sp_repr_css_attr(item->getRepr(), "style");
- gchar const *val = sp_repr_css_property(css, "fill-rule", NULL);
+ gchar const *val = sp_repr_css_property(css, "fill-rule", nullptr);
if (val && strcmp(val, "nonzero") == 0) {
return fill_nonZero;
} else if (val && strcmp(val, "evenodd") == 0) {
diff --git a/src/live_effects/lpe-bspline.cpp b/src/live_effects/lpe-bspline.cpp
index 7834ff108..04182e84b 100644
--- a/src/live_effects/lpe-bspline.cpp
+++ b/src/live_effects/lpe-bspline.cpp
@@ -208,7 +208,7 @@ void sp_bspline_do_effect(SPCurve *curve, double helper_size)
Geom::D2<Geom::SBasis> sbasis_in;
Geom::D2<Geom::SBasis> sbasis_out;
Geom::D2<Geom::SBasis> sbasis_helper;
- Geom::CubicBezier const *cubic = NULL;
+ Geom::CubicBezier const *cubic = nullptr;
curve_n->moveto(curve_it1->initialPoint());
if (path_it->closed()) {
const Geom::Curve &closingline = path_it->back_closed();
@@ -375,7 +375,7 @@ void LPEBSpline::doBSplineFromWidget(SPCurve *curve, double weight_ammount)
Geom::Point point_at3(0, 0);
Geom::D2<Geom::SBasis> sbasis_in;
Geom::D2<Geom::SBasis> sbasis_out;
- Geom::CubicBezier const *cubic = NULL;
+ Geom::CubicBezier const *cubic = nullptr;
curve_n->moveto(curve_it1->initialPoint());
if (path_it->closed()) {
const Geom::Curve &closingline = path_it->back_closed();
diff --git a/src/live_effects/lpe-clone-original.cpp b/src/live_effects/lpe-clone-original.cpp
index f384c8bec..f491c7ad7 100644
--- a/src/live_effects/lpe-clone-original.cpp
+++ b/src/live_effects/lpe-clone-original.cpp
@@ -46,7 +46,7 @@ LPECloneOriginal::LPECloneOriginal(LivePathEffectObject *lpeobject) :
const gchar * linkedpath = this->getRepr()->attribute("linkedpath");
if (linkedpath && strcmp(linkedpath, "") != 0){
this->getRepr()->setAttribute("linkeditem", linkedpath);
- this->getRepr()->setAttribute("linkedpath", NULL);
+ this->getRepr()->setAttribute("linkedpath", nullptr);
this->getRepr()->setAttribute("method", "bsplinespiro");
this->getRepr()->setAttribute("allow_transforms", "false");
};
@@ -118,11 +118,11 @@ LPECloneOriginal::cloneAttrbutes(SPObject *origin, SPObject *dest, const gchar *
}
gchar ** attarray = g_strsplit(attributes, ",", 0);
gchar ** iter = attarray;
- while (*iter != NULL) {
+ while (*iter != nullptr) {
const char* attribute = (*iter);
if (strlen(attribute)) {
if ( shape_dest && shape_origin && (std::strcmp(attribute, "d") == 0)) {
- SPCurve *c = NULL;
+ SPCurve *c = nullptr;
if (method == CLM_BSPLINESPIRO) {
c = shape_origin->getCurveForEdit();
SPLPEItem * lpe_item = SP_LPE_ITEM(origin);
@@ -157,7 +157,7 @@ LPECloneOriginal::cloneAttrbutes(SPObject *origin, SPObject *dest, const gchar *
g_free(str);
c->unref();
} else {
- dest->getRepr()->setAttribute(attribute, NULL);
+ dest->getRepr()->setAttribute(attribute, nullptr);
}
} else {
dest->getRepr()->setAttribute(attribute, origin->getRepr()->attribute(attribute));
@@ -172,12 +172,12 @@ LPECloneOriginal::cloneAttrbutes(SPObject *origin, SPObject *dest, const gchar *
sp_repr_css_attr_add_from_string(css_dest, dest->getRepr()->attribute("style"));
gchar ** styleattarray = g_strsplit(style_attributes, ",", 0);
gchar ** styleiter = styleattarray;
- while (*styleiter != NULL) {
+ while (*styleiter != nullptr) {
const char* attribute = (*styleiter);
if (strlen(attribute)) {
const char* origin_attribute = sp_repr_css_property(css_origin, attribute, "");
if (!strlen(origin_attribute)) { //==0
- sp_repr_css_set_property (css_dest, attribute, NULL);
+ sp_repr_css_set_property (css_dest, attribute, nullptr);
} else {
sp_repr_css_set_property (css_dest, attribute, origin_attribute);
}
diff --git a/src/live_effects/lpe-copy_rotate.cpp b/src/live_effects/lpe-copy_rotate.cpp
index 650d45747..909bd411e 100644
--- a/src/live_effects/lpe-copy_rotate.cpp
+++ b/src/live_effects/lpe-copy_rotate.cpp
@@ -74,7 +74,7 @@ LPECopyRotate::LPECopyRotate(LivePathEffectObject *lpeobject) :
_provides_knotholder_entities = true;
//0.92 compatibility
if (this->getRepr()->attribute("fuse_paths") && strcmp(this->getRepr()->attribute("fuse_paths"), "true") == 0){
- this->getRepr()->setAttribute("fuse_paths", NULL);
+ this->getRepr()->setAttribute("fuse_paths", nullptr);
this->getRepr()->setAttribute("method", "kaleidoskope");
this->getRepr()->setAttribute("mirror_copies", "true");
};
@@ -136,7 +136,7 @@ LPECopyRotate::doAfterEffect (SPLPEItem const* lpeitem)
if (id.empty()) {
return;
}
- SPObject *elemref = NULL;
+ SPObject *elemref = nullptr;
if (elemref = document->getObjectById(id.c_str())) {
SP_ITEM(elemref)->setHidden(true);
}
@@ -146,7 +146,7 @@ LPECopyRotate::doAfterEffect (SPLPEItem const* lpeitem)
}
previous_num_copies = num_copies;
}
- SPObject *elemref = NULL;
+ SPObject *elemref = nullptr;
guint counter = 0;
Glib::ustring id = "rotated-0-";
id += this->lpeobj->getId();
@@ -230,7 +230,7 @@ LPECopyRotate::cloneD(SPObject *orig, SPObject *dest, Geom::Affine transform, bo
g_free(str);
c->unref();
} else {
- path->getRepr()->setAttribute("d", NULL);
+ path->getRepr()->setAttribute("d", nullptr);
}
if (reset) {
dest->getRepr()->setAttribute("style", shape->getRepr()->attribute("style"));
@@ -242,7 +242,7 @@ Inkscape::XML::Node *
LPECopyRotate::createPathBase(SPObject *elemref) {
SPDocument * document = SP_ACTIVE_DOCUMENT;
if (!document) {
- return NULL;
+ return nullptr;
}
Inkscape::XML::Document *xml_doc = document->getReprDoc();
Inkscape::XML::Node *prev = elemref->getRepr();
@@ -251,7 +251,7 @@ LPECopyRotate::createPathBase(SPObject *elemref) {
Inkscape::XML::Node *container = xml_doc->createElement("svg:g");
container->setAttribute("transform", prev->attribute("transform"));
std::vector<SPItem*> const item_list = sp_item_group_item_list(group);
- Inkscape::XML::Node *previous = NULL;
+ Inkscape::XML::Node *previous = nullptr;
for ( std::vector<SPItem*>::const_iterator iter=item_list.begin();iter!=item_list.end();++iter) {
SPObject *sub_item = *iter;
Inkscape::XML::Node *resultnode = createPathBase(sub_item);
@@ -278,8 +278,8 @@ LPECopyRotate::toItem(Geom::Affine transform, size_t i, bool reset)
elemref_id += "-";
elemref_id += this->lpeobj->getId();
items.push_back(elemref_id);
- SPObject *elemref= NULL;
- Inkscape::XML::Node *phantom = NULL;
+ SPObject *elemref= nullptr;
+ Inkscape::XML::Node *phantom = nullptr;
if (elemref = document->getObjectById(elemref_id.c_str())) {
phantom = elemref->getRepr();
} else {
diff --git a/src/live_effects/lpe-embrodery-stitch-ordering.cpp b/src/live_effects/lpe-embrodery-stitch-ordering.cpp
index b631065a8..86abf2d68 100644
--- a/src/live_effects/lpe-embrodery-stitch-ordering.cpp
+++ b/src/live_effects/lpe-embrodery-stitch-ordering.cpp
@@ -256,8 +256,8 @@ void OrderingPoint::FindNearest2(const std::vector<OrderingInfoEx *> &infos)
Coord dist0 = infinity();
Coord dist1 = infinity();
- nearest[0] = 0;
- nearest[1] = 0;
+ nearest[0] = nullptr;
+ nearest[1] = nullptr;
for (std::vector<OrderingInfoEx *>::const_iterator it = infos.begin(); it != infos.end(); ++it) {
Coord dist = distance(point, (*it)->beg.point);
@@ -297,16 +297,16 @@ void OrderingPoint::FindNearest2(const std::vector<OrderingInfoEx *> &infos)
void OrderingPoint::EnforceMutual(void)
{
if (nearest[0] && !(this == nearest[0]->nearest[0] || this == nearest[0]->nearest[1])) {
- nearest[0] = 0;
+ nearest[0] = nullptr;
}
if (nearest[1] && !(this == nearest[1]->nearest[0] || this == nearest[1]->nearest[1])) {
- nearest[1] = 0;
+ nearest[1] = nullptr;
}
if (nearest[1] && !nearest[0]) {
nearest[0] = nearest[1];
- nearest[1] = 0;
+ nearest[1] = nullptr;
}
}
@@ -318,19 +318,19 @@ void OrderingPoint::EnforceSymmetric(const OrderingPoint &other)
(other.nearest[0] && nearest[0]->infoex == other.nearest[0]->infoex) ||
(other.nearest[1] && nearest[0]->infoex == other.nearest[1]->infoex)
)) {
- nearest[0] = 0;
+ nearest[0] = nullptr;
}
if (nearest[1] && !(
(other.nearest[0] && nearest[1]->infoex == other.nearest[0]->infoex) ||
(other.nearest[1] && nearest[1]->infoex == other.nearest[1]->infoex)
)) {
- nearest[1] = 0;
+ nearest[1] = nullptr;
}
if (nearest[1] && !nearest[0]) {
nearest[0] = nearest[1];
- nearest[1] = 0;
+ nearest[1] = nullptr;
}
}
@@ -415,7 +415,7 @@ OrderingGroupNeighbor *OrderingGroupPoint::FindNearestUnused(void)
// it shouldn't happen that we can't find any point at all
assert(0);
- return 0;
+ return nullptr;
}
// Return the other end in the group of the point
@@ -430,11 +430,11 @@ OrderingGroupPoint *OrderingGroupPoint::GetOtherEndGroup(void)
OrderingGroupPoint *OrderingGroupPoint::GetAltPointGroup(void)
{
if (group->nEndPoints < 4) {
- return 0;
+ return nullptr;
}
OrderingGroupPoint *alt = group->endpoints[ indexInGroup ^ 2 ];
- return alt->used ? 0 : alt;
+ return alt->used ? nullptr : alt;
}
@@ -635,7 +635,7 @@ bool FindShortestReconnect(std::vector<OrderingSegment> &segments, std::vector<O
{
// Find the longest connection outside of the active set
// The longest segment is then the longest of this longest outside segment and all inside segments
- OrderingGroupConnection *longestOutside = 0;
+ OrderingGroupConnection *longestOutside = nullptr;
if (contains(connections, *longestConnect)) {
// The longest connection is inside the active set, so we need to search for the longest outside
@@ -905,7 +905,7 @@ void OrderGroups(std::vector<OrderingGroup *> *groups, const int nDims)
OrderingGroupPoint *crnt = groups->front()->endpoints[0];
// The longest connection is ignored (we don't want cycles)
- OrderingGroupConnection *longestConnect = 0;
+ OrderingGroupConnection *longestConnect = nullptr;
for (unsigned int nConnected = 0; nConnected < groups->size(); nConnected++) {
// Mark both end points of the current segment as used
diff --git a/src/live_effects/lpe-embrodery-stitch-ordering.h b/src/live_effects/lpe-embrodery-stitch-ordering.h
index c307ec555..5f64462f7 100644
--- a/src/live_effects/lpe-embrodery-stitch-ordering.h
+++ b/src/live_effects/lpe-embrodery-stitch-ordering.h
@@ -55,7 +55,7 @@ struct OrderingPoint {
infoex(infoexIn),
begin(beginIn)
{
- nearest[0] = nearest[1] = 0;
+ nearest[0] = nearest[1] = nullptr;
}
// Check if both nearest values are valid
@@ -137,7 +137,7 @@ struct OrderingGroupPoint {
point(pointIn),
group(groupIn),
indexInGroup(indexIn),
- connection(0),
+ connection(nullptr),
indexInConnection(0),
begin(beginIn),
front(frontIn),
@@ -189,8 +189,8 @@ struct OrderingGroupConnection {
{
assert(fromIn->connection == 0);
assert(toIn->connection == 0);
- points[0] = 0;
- points[1] = 0;
+ points[0] = nullptr;
+ points[1] = nullptr;
Connect(0, fromIn);
Connect(1, toIn);
}
@@ -227,7 +227,7 @@ struct OrderingGroup {
index(indexIn)
{
for (int i = 0; i < sizeof(endpoints) / sizeof(*endpoints); i++) {
- endpoints[i] = 0;
+ endpoints[i] = nullptr;
}
}
diff --git a/src/live_effects/lpe-fill-between-many.cpp b/src/live_effects/lpe-fill-between-many.cpp
index 9715d7ff8..389ddf007 100644
--- a/src/live_effects/lpe-fill-between-many.cpp
+++ b/src/live_effects/lpe-fill-between-many.cpp
@@ -79,7 +79,7 @@ void LPEFillBetweenMany::doOnApply (SPLPEItem const* lpeitem)
lpe_repr->setAttribute("applied", "true");
lpe_repr->setAttribute("method", "partial");
lpe_repr->setAttribute("allow_transforms", "false");
- document->getDefs()->getRepr()->addChild(lpe_repr, NULL); // adds to <defs> and assigns the 'id' attribute
+ document->getDefs()->getRepr()->addChild(lpe_repr, nullptr); // adds to <defs> and assigns the 'id' attribute
}
std::string lpe_id_href = std::string("#") + lpe_repr->attribute("id");
Inkscape::GC::release(lpe_repr);
@@ -149,7 +149,7 @@ void LPEFillBetweenMany::doEffect (SPCurve * curve)
}
if(!allow_transforms) {
- SP_ITEM(sp_lpe_item)->setAttribute("transform", NULL);
+ SP_ITEM(sp_lpe_item)->setAttribute("transform", nullptr);
}
if (!res_pathv.empty() && close) {
diff --git a/src/live_effects/lpe-fill-between-strokes.cpp b/src/live_effects/lpe-fill-between-strokes.cpp
index 5f4fd4fc2..5f327b6a4 100644
--- a/src/live_effects/lpe-fill-between-strokes.cpp
+++ b/src/live_effects/lpe-fill-between-strokes.cpp
@@ -43,7 +43,7 @@ void LPEFillBetweenStrokes::doEffect (SPCurve * curve)
if (curve) {
Geom::Affine affine = Geom::identity();
if(!allow_transforms) {
- SP_ITEM(sp_lpe_item)->setAttribute("transform", NULL);
+ SP_ITEM(sp_lpe_item)->setAttribute("transform", nullptr);
}
if ( linked_path.linksToPath() && second_path.linksToPath() && linked_path.getObject() && second_path.getObject() ) {
Geom::PathVector linked_pathv = linked_path.get_pathvector();
diff --git a/src/live_effects/lpe-fillet-chamfer.cpp b/src/live_effects/lpe-fillet-chamfer.cpp
index bb60db5c6..a6c8ab90b 100644
--- a/src/live_effects/lpe-fillet-chamfer.cpp
+++ b/src/live_effects/lpe-fillet-chamfer.cpp
@@ -63,7 +63,7 @@ LPEFilletChamfer::LPEFilletChamfer(LivePathEffectObject *lpeobject)
apply_with_radius(_("Apply changes if radius > 0"), _("Apply changes if radius > 0"), "apply_with_radius", &wr, this, true),
helper_size(_("Helper path size with direction to node:"),
_("Helper path size with direction to node"), "helper_size", &wr, this, 0),
- _pathvector_satellites(NULL),
+ _pathvector_satellites(nullptr),
_degenerate_hide(false)
{
registerParameter(&satellites_param);
@@ -104,7 +104,7 @@ void LPEFilletChamfer::doOnApply(SPLPEItem const *lpeItem)
double power = radius;
if (!flexible) {
SPDocument * document = SP_ACTIVE_DOCUMENT;
- SPNamedView *nv = sp_document_namedview(document, NULL);
+ SPNamedView *nv = sp_document_namedview(document, nullptr);
Glib::ustring display_unit = nv->display_units->abbr;
power = Inkscape::Util::Quantity::convert(power, unit.get_abbreviation(), display_unit.c_str());
}
@@ -271,7 +271,7 @@ void LPEFilletChamfer::updateAmount()
double power = radius;
if (!flexible) {
SPDocument * document = SP_ACTIVE_DOCUMENT;
- SPNamedView *nv = sp_document_namedview(document, NULL);
+ SPNamedView *nv = sp_document_namedview(document, nullptr);
Glib::ustring display_unit = nv->display_units->abbr;
power = Inkscape::Util::Quantity::convert(power, unit.get_abbreviation(), display_unit.c_str());
}
@@ -346,7 +346,7 @@ void LPEFilletChamfer::doBeforeEffect(SPLPEItem const *lpeItem)
double power = radius;
if (!flexible) {
SPDocument * document = SP_ACTIVE_DOCUMENT;
- SPNamedView *nv = sp_document_namedview(document, NULL);
+ SPNamedView *nv = sp_document_namedview(document, nullptr);
Glib::ustring display_unit = nv->display_units->abbr;
power = Inkscape::Util::Quantity::convert(power, unit.get_abbreviation(), display_unit.c_str());
}
diff --git a/src/live_effects/lpe-knot.cpp b/src/live_effects/lpe-knot.cpp
index f42ee75e4..8522444c6 100644
--- a/src/live_effects/lpe-knot.cpp
+++ b/src/live_effects/lpe-knot.cpp
@@ -615,7 +615,7 @@ LPEKnot::addCanvasIndicators(SPLPEItem const */*lpeitem*/, std::vector<Geom::Pat
void LPEKnot::addKnotHolderEntities(KnotHolder *knotholder, SPItem *item)
{
KnotHolderEntity *e = new KnotHolderEntityCrossingSwitcher(this);
- e->create( NULL, item, knotholder, Inkscape::CTRL_TYPE_UNKNOWN,
+ e->create( nullptr, item, knotholder, Inkscape::CTRL_TYPE_UNKNOWN,
_("Drag to select a crossing, click to flip it") );
knotholder->add(e);
};
diff --git a/src/live_effects/lpe-lattice2.cpp b/src/live_effects/lpe-lattice2.cpp
index 8c2c3ec31..ae9ec0361 100644
--- a/src/live_effects/lpe-lattice2.cpp
+++ b/src/live_effects/lpe-lattice2.cpp
@@ -238,7 +238,7 @@ LPELattice2::newWidget()
Parameter * param = *it;
Gtk::Widget * widg = dynamic_cast<Gtk::Widget *>(param->param_newWidget());
if(param->param_key == "grid") {
- widg = NULL;
+ widg = nullptr;
}
Glib::ustring * tip = param->param_getTooltip();
if (widg) {
diff --git a/src/live_effects/lpe-measure-segments.cpp b/src/live_effects/lpe-measure-segments.cpp
index 0ec03ced0..fd016f24c 100644
--- a/src/live_effects/lpe-measure-segments.cpp
+++ b/src/live_effects/lpe-measure-segments.cpp
@@ -182,7 +182,7 @@ LPEMeasureSegments::LPEMeasureSegments(LivePathEffectObject *lpeobject) :
angle_projection.param_set_range(0.0, 360.0);
angle_projection.param_set_increments(90.0, 90.0);
angle_projection.param_set_digits(2);
- locale_base = strdup(setlocale(LC_NUMERIC, NULL));
+ locale_base = strdup(setlocale(LC_NUMERIC, nullptr));
previous_size = 0;
pagenumber = 0;
general.param_update_default(_("Base of the LPE, focus on measure display and positioning"));
@@ -195,7 +195,7 @@ LPEMeasureSegments::LPEMeasureSegments(LivePathEffectObject *lpeobject) :
}
LPEMeasureSegments::~LPEMeasureSegments() {
- doOnRemove(NULL);
+ doOnRemove(nullptr);
}
Gtk::Widget *
@@ -324,16 +324,16 @@ LPEMeasureSegments::createArrowMarker(Glib::ustring mode)
style = style + Glib::ustring(";fill-opacity:") + Glib::ustring(os.str());
style = style + Glib::ustring(";stroke:none");
Inkscape::XML::Document *xml_doc = document->getReprDoc();
- SPObject *elemref = NULL;
- Inkscape::XML::Node *arrow = NULL;
+ SPObject *elemref = nullptr;
+ Inkscape::XML::Node *arrow = nullptr;
if ((elemref = document->getObjectById(mode.c_str()))) {
Inkscape::XML::Node *arrow= elemref->getRepr();
if (arrow) {
arrow->setAttribute("sodipodi:insensitive", "true");
- arrow->setAttribute("transform", NULL);
+ arrow->setAttribute("transform", nullptr);
Inkscape::XML::Node *arrow_data = arrow->firstChild();
if (arrow_data) {
- arrow_data->setAttribute("transform", NULL);
+ arrow_data->setAttribute("transform", nullptr);
arrow_data->setAttribute("style", style.c_str());
}
}
@@ -370,7 +370,7 @@ LPEMeasureSegments::createArrowMarker(Glib::ustring mode)
Glib::ustring arrowpath = mode + Glib::ustring("_path");
arrow_path->setAttribute("id", arrowpath.c_str());
arrow_path->setAttribute("style", style.c_str());
- arrow->addChild(arrow_path, NULL);
+ arrow->addChild(arrow_path, nullptr);
Inkscape::GC::release(arrow_path);
elemref = SP_OBJECT(document->getDefs()->appendChildRepr(arrow));
Inkscape::GC::release(arrow);
@@ -386,7 +386,7 @@ LPEMeasureSegments::createTextLabel(Geom::Point pos, size_t counter, double leng
return;
}
Inkscape::XML::Document *xml_doc = document->getReprDoc();
- Inkscape::XML::Node *rtext = NULL;
+ Inkscape::XML::Node *rtext = nullptr;
Glib::ustring lpobjid = this->lpeobj->getId();
Glib::ustring itemid = sp_lpe_item->getId();
@@ -394,15 +394,15 @@ LPEMeasureSegments::createTextLabel(Geom::Point pos, size_t counter, double leng
id += Glib::ustring::format(counter);
id += "-";
id += lpobjid;
- SPObject *elemref = NULL;
- Inkscape::XML::Node *rtspan = NULL;
+ SPObject *elemref = nullptr;
+ Inkscape::XML::Node *rtspan = nullptr;
elemref = document->getObjectById(id.c_str());
if (elemref) {
rtext = elemref->getRepr();
sp_repr_set_svg_double(rtext, "x", pos[Geom::X]);
sp_repr_set_svg_double(rtext, "y", pos[Geom::Y]);
rtext->setAttribute("sodipodi:insensitive", "true");
- rtext->setAttribute("transform", NULL);
+ rtext->setAttribute("transform", nullptr);
} else {
rtext = xml_doc->createElement("svg:text");
rtext->setAttribute("xml:space", "preserve");
@@ -445,10 +445,10 @@ LPEMeasureSegments::createTextLabel(Geom::Point pos, size_t counter, double leng
sp_repr_css_write_string(css,css_str);
rtext->setAttribute("style", css_str.c_str());
rtspan->setAttribute("style", css_str.c_str());
- rtspan->setAttribute("transform", NULL);
+ rtspan->setAttribute("transform", nullptr);
sp_repr_css_attr_unref (css);
if (!elemref) {
- rtext->addChild(rtspan, NULL);
+ rtext->addChild(rtspan, nullptr);
Inkscape::GC::release(rtspan);
}
length = Inkscape::Util::Quantity::convert(length / doc_scale, display_unit.c_str(), unit.get_abbreviation());
@@ -489,10 +489,10 @@ LPEMeasureSegments::createTextLabel(Geom::Point pos, size_t counter, double leng
if ( !valid ) {
label_value = Glib::ustring(_("Non Uniform Scale"));
}
- Inkscape::XML::Node *rstring = NULL;
+ Inkscape::XML::Node *rstring = nullptr;
if (!elemref) {
rstring = xml_doc->createTextNode(label_value.c_str());
- rtspan->addChild(rstring, NULL);
+ rtspan->addChild(rstring, nullptr);
Inkscape::GC::release(rstring);
} else {
rstring = rtspan->firstChild();
@@ -505,7 +505,7 @@ LPEMeasureSegments::createTextLabel(Geom::Point pos, size_t counter, double leng
Geom::OptRect bounds = SP_ITEM(elemref)->bounds(SPItem::GEOMETRIC_BBOX);
if (bounds) {
anotation_width = bounds->width() * 1.15;
- rtspan->setAttribute("style", NULL);
+ rtspan->setAttribute("style", nullptr);
}
gchar * transform;
if (rotate_anotation) {
@@ -520,7 +520,7 @@ LPEMeasureSegments::createTextLabel(Geom::Point pos, size_t counter, double leng
affine *= Geom::Translate(pos);
transform = sp_svg_transform_write(affine);
} else {
- transform = NULL;
+ transform = nullptr;
}
rtext->setAttribute("transform", transform);
g_free(transform);
@@ -541,7 +541,7 @@ LPEMeasureSegments::createLine(Geom::Point start,Geom::Point end, Glib::ustring
id += lpobjid;
Inkscape::XML::Document *xml_doc = document->getReprDoc();
SPObject *elemref = document->getObjectById(id.c_str());
- Inkscape::XML::Node *line = NULL;
+ Inkscape::XML::Node *line = nullptr;
if (!main) {
Geom::Ray ray(start, end);
Geom::Coord angle = ray.angle();
@@ -575,7 +575,7 @@ LPEMeasureSegments::createLine(Geom::Point start,Geom::Point end, Glib::ustring
line = elemref->getRepr();
gchar * line_str = sp_svg_write_path( line_pathv );
line->setAttribute("d" , line_str);
- line->setAttribute("transform", NULL);
+ line->setAttribute("transform", nullptr);
g_free(line_str);
} else {
line = xml_doc->createElement("svg:path");
@@ -655,8 +655,8 @@ LPEMeasureSegments::doOnApply(SPLPEItem const* lpeitem)
SPDocument *document = SP_ACTIVE_DOCUMENT;
bool saved = DocumentUndo::getUndoSensitive(document);
DocumentUndo::setUndoSensitive(document, false);
- Inkscape::XML::Node *styleNode = NULL;
- Inkscape::XML::Node* textNode = NULL;
+ Inkscape::XML::Node *styleNode = nullptr;
+ Inkscape::XML::Node* textNode = nullptr;
Inkscape::XML::Node *root = SP_ACTIVE_DOCUMENT->getReprRoot();
for (unsigned i = 0; i < root->childCount(); ++i) {
if (Glib::ustring(root->nthChild(i)->name()) == "svg:style") {
@@ -669,7 +669,7 @@ LPEMeasureSegments::doOnApply(SPLPEItem const* lpeitem)
}
}
- if (textNode == NULL) {
+ if (textNode == nullptr) {
// Style element found but does not contain text node!
std::cerr << "StyleDialog::_getStyleTextNode(): No text node!" << std::endl;
textNode = SP_ACTIVE_DOCUMENT->getReprDoc()->createTextNode("");
@@ -679,7 +679,7 @@ LPEMeasureSegments::doOnApply(SPLPEItem const* lpeitem)
}
}
- if (styleNode == NULL) {
+ if (styleNode == nullptr) {
// Style element not found, create one
styleNode = SP_ACTIVE_DOCUMENT->getReprDoc()->createElement("svg:style");
textNode = SP_ACTIVE_DOCUMENT->getReprDoc()->createTextNode("");
@@ -687,7 +687,7 @@ LPEMeasureSegments::doOnApply(SPLPEItem const* lpeitem)
styleNode->appendChild(textNode);
Inkscape::GC::release(textNode);
- root->addChild(styleNode, NULL);
+ root->addChild(styleNode, nullptr);
Inkscape::GC::release(styleNode);
}
Glib::ustring styleContent = Glib::ustring(textNode->content());
@@ -919,7 +919,7 @@ LPEMeasureSegments::doBeforeEffect (SPLPEItem const* lpeitem)
if (shape) {
//only check constrain viewbox on X
Geom::Scale scaledoc = document->getDocumentScale();
- SPNamedView *nv = sp_document_namedview(document, NULL);
+ SPNamedView *nv = sp_document_namedview(document, nullptr);
display_unit = nv->display_units->abbr;
if (display_unit.empty()) {
display_unit = "px";
@@ -938,7 +938,7 @@ LPEMeasureSegments::doBeforeEffect (SPLPEItem const* lpeitem)
}
rgb24 = color;
rgb32 = color32;
- SPCurve * c = NULL;
+ SPCurve * c = nullptr;
gchar * fontbutton_str = fontbutton.param_getSVGValue();
Glib::ustring fontdesc_ustring = Glib::ustring(fontbutton_str);
Pango::FontDescription fontdesc(fontdesc_ustring);
diff --git a/src/live_effects/lpe-mirror_symmetry.cpp b/src/live_effects/lpe-mirror_symmetry.cpp
index 4d9b218a5..66f00689a 100644
--- a/src/live_effects/lpe-mirror_symmetry.cpp
+++ b/src/live_effects/lpe-mirror_symmetry.cpp
@@ -249,7 +249,7 @@ LPEMirrorSymmetry::doBeforeEffect (SPLPEItem const* lpeitem)
} else if ( mode == MT_V){
SPDocument * document = SP_ACTIVE_DOCUMENT;
if (document) {
- Geom::Affine transform = i2anc_affine(SP_OBJECT(lpeitem), NULL).inverse();
+ Geom::Affine transform = i2anc_affine(SP_OBJECT(lpeitem), nullptr).inverse();
Geom::Point sp = Geom::Point(document->getWidth().value("px")/2.0, 0) * transform;
start_point.param_setValue(sp);
Geom::Point ep = Geom::Point(document->getWidth().value("px")/2.0, document->getHeight().value("px")) * transform;
@@ -259,7 +259,7 @@ LPEMirrorSymmetry::doBeforeEffect (SPLPEItem const* lpeitem)
} else { //horizontal page
SPDocument * document = SP_ACTIVE_DOCUMENT;
if (document) {
- Geom::Affine transform = i2anc_affine(SP_OBJECT(lpeitem), NULL).inverse();
+ Geom::Affine transform = i2anc_affine(SP_OBJECT(lpeitem), nullptr).inverse();
Geom::Point sp = Geom::Point(0, document->getHeight().value("px")/2.0) * transform;
start_point.param_setValue(sp);
Geom::Point ep = Geom::Point(document->getWidth().value("px"), document->getHeight().value("px")/2.0) * transform;
@@ -300,7 +300,7 @@ LPEMirrorSymmetry::cloneD(SPObject *orig, SPObject *dest, bool reset)
g_free(str);
c->unref();
} else {
- dest->getRepr()->setAttribute("d", NULL);
+ dest->getRepr()->setAttribute("d", nullptr);
}
if (reset) {
dest->getRepr()->setAttribute("style", shape->getRepr()->attribute("style"));
@@ -312,7 +312,7 @@ Inkscape::XML::Node *
LPEMirrorSymmetry::createPathBase(SPObject *elemref) {
SPDocument * document = SP_ACTIVE_DOCUMENT;
if (!document) {
- return NULL;
+ return nullptr;
}
Inkscape::XML::Document *xml_doc = document->getReprDoc();
Inkscape::XML::Node *prev = elemref->getRepr();
@@ -321,7 +321,7 @@ LPEMirrorSymmetry::createPathBase(SPObject *elemref) {
Inkscape::XML::Node *container = xml_doc->createElement("svg:g");
container->setAttribute("transform", prev->attribute("transform"));
std::vector<SPItem*> const item_list = sp_item_group_item_list(group);
- Inkscape::XML::Node *previous = NULL;
+ Inkscape::XML::Node *previous = nullptr;
for ( std::vector<SPItem*>::const_iterator iter=item_list.begin();iter!=item_list.end();++iter) {
SPObject *sub_item = *iter;
Inkscape::XML::Node *resultnode = createPathBase(sub_item);
@@ -347,8 +347,8 @@ LPEMirrorSymmetry::toMirror(Geom::Affine transform, bool reset)
elemref_id += this->lpeobj->getId();
items.clear();
items.push_back(elemref_id);
- SPObject *elemref = NULL;
- Inkscape::XML::Node *phantom = NULL;
+ SPObject *elemref = nullptr;
+ Inkscape::XML::Node *phantom = nullptr;
if (elemref = document->getObjectById(elemref_id.c_str())) {
phantom = elemref->getRepr();
} else {
diff --git a/src/live_effects/lpe-offset.cpp b/src/live_effects/lpe-offset.cpp
index 02b3c8eed..91ea9df74 100644
--- a/src/live_effects/lpe-offset.cpp
+++ b/src/live_effects/lpe-offset.cpp
@@ -90,7 +90,7 @@ LPEOffset::LPEOffset(LivePathEffectObject *lpeobject) :
offset_pt = Geom::Point();
origin = Geom::Point();
evenodd = true;
- _knot_entity = NULL;
+ _knot_entity = nullptr;
_provides_knotholder_entities = true;
apply_to_clippath_and_mask = true;
}
@@ -204,7 +204,7 @@ LPEOffset::doBeforeEffect (SPLPEItem const* lpeitem)
SPCSSAttr *css;
const gchar *val;
css = sp_repr_css_attr (item->getRepr() , "style");
- val = sp_repr_css_property (css, "fill-rule", NULL);
+ val = sp_repr_css_property (css, "fill-rule", nullptr);
bool upd_fill_rule = false;
if (val && strcmp (val, "nonzero") == 0)
{
@@ -251,7 +251,7 @@ LPEOffset::doEffect_path(Geom::PathVector const & path_in)
Geom::Point winding_point = original[0].initialPoint();
int wind = 0;
double dist = Geom::infinity();
- pathv_matrix_point_bbox_wind_distance(original_pathv, Geom::identity(), winding_point, NULL, &wind, &dist, 0.5, NULL);
+ pathv_matrix_point_bbox_wind_distance(original_pathv, Geom::identity(), winding_point, nullptr, &wind, &dist, 0.5, nullptr);
bool path_inside = wind % 2 != 0;
Geom::PathVector outline = Inkscape::outline(original, std::abs(offset) * 2 ,
(attempt_force_join ? std::numeric_limits<double>::max() : miter_limit),
@@ -382,7 +382,7 @@ LPEOffset::drawHandle(Geom::Point p)
void LPEOffset::addKnotHolderEntities(KnotHolder *knotholder, SPItem *item)
{
_knot_entity = new OfS::KnotHolderEntityOffsetPoint(this);
- _knot_entity->create(NULL, item, knotholder, Inkscape::CTRL_TYPE_UNKNOWN, _("Offset point"), SP_KNOT_SHAPE_CIRCLE);
+ _knot_entity->create(nullptr, item, knotholder, Inkscape::CTRL_TYPE_UNKNOWN, _("Offset point"), SP_KNOT_SHAPE_CIRCLE);
knotholder->add(_knot_entity);
}
diff --git a/src/live_effects/lpe-patternalongpath.cpp b/src/live_effects/lpe-patternalongpath.cpp
index 09794f7a7..dd052c796 100644
--- a/src/live_effects/lpe-patternalongpath.cpp
+++ b/src/live_effects/lpe-patternalongpath.cpp
@@ -53,7 +53,7 @@ namespace WPAP {
~KnotHolderEntityWidthPatternAlongPath() override
{
LPEPatternAlongPath *lpe = dynamic_cast<LPEPatternAlongPath *> (_effect);
- lpe->_knot_entity = NULL;
+ lpe->_knot_entity = nullptr;
}
void knot_set(Geom::Point const &p, Geom::Point const &origin, guint state) override;
Geom::Point knot_get() const override;
@@ -106,7 +106,7 @@ LPEPatternAlongPath::LPEPatternAlongPath(LivePathEffectObject *lpeobject) :
registerParameter(&fuse_tolerance);
prop_scale.param_set_digits(3);
prop_scale.param_set_increments(0.01, 0.10);
- _knot_entity = NULL;
+ _knot_entity = nullptr;
_provides_knotholder_entities = true;
}
@@ -298,7 +298,7 @@ void
LPEPatternAlongPath::addKnotHolderEntities(KnotHolder *knotholder, SPItem *item)
{
_knot_entity = new WPAP::KnotHolderEntityWidthPatternAlongPath(this);
- _knot_entity->create(NULL, item, knotholder, Inkscape::CTRL_TYPE_UNKNOWN, _("Change the width"), SP_KNOT_SHAPE_CIRCLE);
+ _knot_entity->create(nullptr, item, knotholder, Inkscape::CTRL_TYPE_UNKNOWN, _("Change the width"), SP_KNOT_SHAPE_CIRCLE);
knotholder->add(_knot_entity);
if (hide_knot) {
_knot_entity->knot->hide();
diff --git a/src/live_effects/lpe-perspective-envelope.cpp b/src/live_effects/lpe-perspective-envelope.cpp
index e95cdfd4b..dcbf3fee7 100644
--- a/src/live_effects/lpe-perspective-envelope.cpp
+++ b/src/live_effects/lpe-perspective-envelope.cpp
@@ -235,7 +235,7 @@ void LPEPerspectiveEnvelope::doEffect(SPCurve *curve)
}
Geom::PathVector const original_pathv = pathv_to_linear_and_cubic_beziers(curve->get_pathvector());
curve->reset();
- Geom::CubicBezier const *cubic = NULL;
+ Geom::CubicBezier const *cubic = nullptr;
Geom::Point point_at1(0, 0);
Geom::Point point_at2(0, 0);
Geom::Point point_at3(0, 0);
diff --git a/src/live_effects/lpe-perspective_path.cpp b/src/live_effects/lpe-perspective_path.cpp
index 0387e52ba..857bd2952 100644
--- a/src/live_effects/lpe-perspective_path.cpp
+++ b/src/live_effects/lpe-perspective_path.cpp
@@ -73,7 +73,7 @@ void
LPEPerspectivePath::doOnApply(SPLPEItem const* lpeitem)
{
Persp3D *persp = persp3d_document_first_persp(lpeitem->document);
- if(persp == 0 ){
+ if(persp == nullptr ){
char *msg = _("You need a BOX 3D object");
Gtk::MessageDialog dialog(msg, false, Gtk::MESSAGE_INFO,
Gtk::BUTTONS_OK, true);
@@ -88,7 +88,7 @@ LPEPerspectivePath::doBeforeEffect (SPLPEItem const* lpeitem)
original_bbox(lpeitem, true);
SPLPEItem * item = const_cast<SPLPEItem*>(lpeitem);
Persp3D *persp = persp3d_document_first_persp(lpeitem->document);
- if(persp == 0 ){
+ if(persp == nullptr ){
char *msg = _("You need a BOX 3D object");
Gtk::MessageDialog dialog(msg, false, Gtk::MESSAGE_INFO,
Gtk::BUTTONS_OK, true);
@@ -103,10 +103,10 @@ LPEPerspectivePath::doBeforeEffect (SPLPEItem const* lpeitem)
void LPEPerspectivePath::refresh(Gtk::Entry* perspective) {
perspectiveID = perspective->get_text();
- Persp3D *first = 0;
- Persp3D *persp = 0;
+ Persp3D *first = nullptr;
+ Persp3D *persp = nullptr;
for (auto& child: lpeobj->document->getDefs()->children) {
- if (SP_IS_PERSP3D(&child) && first == 0) {
+ if (SP_IS_PERSP3D(&child) && first == nullptr) {
first = SP_PERSP3D(&child);
}
if (SP_IS_PERSP3D(&child) && strcmp(child.getId(), const_cast<const gchar *>(perspectiveID.c_str())) == 0) {
@@ -114,14 +114,14 @@ void LPEPerspectivePath::refresh(Gtk::Entry* perspective) {
break;
}
}
- if(first == 0 ){
+ if(first == nullptr ){
char *msg = _("You need a BOX 3D object");
Gtk::MessageDialog dialog(msg, false, Gtk::MESSAGE_INFO,
Gtk::BUTTONS_OK, true);
dialog.run();
return;
}
- if(persp == 0){
+ if(persp == nullptr){
persp = first;
char *msg = _("First perspective selected");
Gtk::MessageDialog dialog(msg, false, Gtk::MESSAGE_INFO,
@@ -263,7 +263,7 @@ LPEPerspectivePath::newWidget()
void LPEPerspectivePath::addKnotHolderEntities(KnotHolder *knotholder, SPItem *item) {
KnotHolderEntity *e = new PP::KnotHolderEntityOffset(this);
- e->create( NULL, item, knotholder, Inkscape::CTRL_TYPE_UNKNOWN,
+ e->create( nullptr, item, knotholder, Inkscape::CTRL_TYPE_UNKNOWN,
_("Adjust the origin") );
knotholder->add(e);
};
diff --git a/src/live_effects/lpe-powerclip.cpp b/src/live_effects/lpe-powerclip.cpp
index b4c342930..35da3bd26 100644
--- a/src/live_effects/lpe-powerclip.cpp
+++ b/src/live_effects/lpe-powerclip.cpp
@@ -94,7 +94,7 @@ LPEPowerClip::doBeforeEffect (SPLPEItem const* lpeitem){
std::vector<SPObject*> clip_path_list = clip_path->childList(true);
for ( std::vector<SPObject*>::const_iterator iter=clip_path_list.begin();iter!=clip_path_list.end();++iter) {
SPObject * clip_data = *iter;
- SPObject * clip_to_path = NULL;
+ SPObject * clip_to_path = nullptr;
if (SP_IS_SHAPE(clip_data) && !SP_IS_PATH(clip_data) && convert_shapes) {
SPDocument * document = SP_ACTIVE_DOCUMENT;
if (!document) {
@@ -126,7 +126,7 @@ LPEPowerClip::doBeforeEffect (SPLPEItem const* lpeitem){
clip_to_path = document->getObjectByRepr(clip_path_node);
// transform position
- SPCurve * c = NULL;
+ SPCurve * c = nullptr;
c = SP_SHAPE(clip_to_path)->getCurve();
if (c) {
Geom::PathVector c_pv = c->get_pathvector();
@@ -136,7 +136,7 @@ LPEPowerClip::doBeforeEffect (SPLPEItem const* lpeitem){
c->unref();
}
- clip_path_node->setAttribute("transform", NULL);
+ clip_path_node->setAttribute("transform", nullptr);
if (title && clip_to_path) {
clip_to_path->setTitle(title);
@@ -190,7 +190,7 @@ LPEPowerClip::addInverse (SPItem * clip_data){
addInverse(subitem);
}
} else if (SP_IS_PATH(clip_data)) {
- SPCurve * c = NULL;
+ SPCurve * c = nullptr;
c = SP_SHAPE(clip_data)->getCurve();
if (c) {
Geom::PathVector c_pv = c->get_pathvector();
@@ -213,7 +213,7 @@ LPEPowerClip::addInverse (SPItem * clip_data){
if (tools_isactive(desktop, TOOLS_NODES)) {
Inkscape::Selection * sel = SP_ACTIVE_DESKTOP->getSelection();
SPItem * item = sel->singleItem();
- if (item != NULL) {
+ if (item != nullptr) {
sel->remove(item);
sel->add(item);
}
@@ -236,7 +236,7 @@ LPEPowerClip::removeInverse (SPItem * clip_data){
removeInverse(subitem);
}
} else if (SP_IS_PATH(clip_data)) {
- SPCurve * c = NULL;
+ SPCurve * c = nullptr;
c = SP_SHAPE(clip_data)->getCurve();
if (c) {
Geom::PathVector c_pv = c->get_pathvector();
@@ -255,7 +255,7 @@ LPEPowerClip::removeInverse (SPItem * clip_data){
if (tools_isactive(desktop, TOOLS_NODES)) {
Inkscape::Selection * sel = SP_ACTIVE_DESKTOP->getSelection();
SPItem * item = sel->singleItem();
- if (item != NULL) {
+ if (item != nullptr) {
sel->remove(item);
sel->add(item);
}
@@ -413,7 +413,7 @@ LPEPowerClip::flattenClip(SPItem * clip_data, Geom::PathVector &path_in)
flattenClip(subitem, path_in);
}
} else if (SP_IS_PATH(clip_data)) {
- SPCurve * c = NULL;
+ SPCurve * c = nullptr;
c = SP_SHAPE(clip_data)->getCurve();
if (c) {
Geom::PathVector c_pv = c->get_pathvector();
diff --git a/src/live_effects/lpe-powermask.cpp b/src/live_effects/lpe-powermask.cpp
index 577d8a841..ac3a1dd76 100644
--- a/src/live_effects/lpe-powermask.cpp
+++ b/src/live_effects/lpe-powermask.cpp
@@ -108,7 +108,7 @@ LPEPowerMask::doBeforeEffect (SPLPEItem const* lpeitem){
void
LPEPowerMask::setMask(){
SPMask *mask = SP_ITEM(sp_lpe_item)->mask_ref->getObject();
- SPObject *elemref = NULL;
+ SPObject *elemref = nullptr;
SPDocument * document = SP_ACTIVE_DOCUMENT;
if (!document || !mask) {
return;
@@ -119,8 +119,8 @@ LPEPowerMask::setMask(){
return;
}
Inkscape::XML::Document *xml_doc = document->getReprDoc();
- Inkscape::XML::Node *box = NULL;
- Inkscape::XML::Node *filter = NULL;
+ Inkscape::XML::Node *box = nullptr;
+ Inkscape::XML::Node *filter = nullptr;
SPDefs * defs = document->getDefs();
Glib::ustring mask_id = (Glib::ustring)mask->getId();
Glib::ustring box_id = mask_id + (Glib::ustring)"_box";
@@ -218,12 +218,12 @@ LPEPowerMask::setMask(){
if(mask_node->attribute("style")) {
sp_repr_css_attr_add_from_string(css, mask_node->attribute("style"));
}
- char const* filter = sp_repr_css_property (css, "filter", NULL);
+ char const* filter = sp_repr_css_property (css, "filter", nullptr);
if(!filter || !strcmp(filter, filter_uri.c_str())) {
if (invert && is_visible) {
sp_repr_css_set_property (css, "filter", filter_uri.c_str());
} else {
- sp_repr_css_set_property (css, "filter", NULL);
+ sp_repr_css_set_property (css, "filter", nullptr);
}
Glib::ustring css_str;
sp_repr_css_write_string(css, css_str);
@@ -250,12 +250,12 @@ LPEPowerMask::setMask(){
style = style + Glib::ustring(";fill-opacity:") + Glib::ustring(os.str());
SPCSSAttr *css = sp_repr_css_attr_new();
sp_repr_css_attr_add_from_string(css, style.c_str());
- char const* filter = sp_repr_css_property (css, "filter", NULL);
+ char const* filter = sp_repr_css_property (css, "filter", nullptr);
if(!filter || !strcmp(filter, filter_uri.c_str())) {
if (invert && is_visible) {
sp_repr_css_set_property (css, "filter", filter_uri.c_str());
} else {
- sp_repr_css_set_property (css, "filter", NULL);
+ sp_repr_css_set_property (css, "filter", nullptr);
}
}
@@ -297,7 +297,7 @@ LPEPowerMask::doOnRemove (SPLPEItem const* lpeitem)
//wrap.param_setValue(false);
background.param_setValue(false);
setMask();
- SPObject *elemref = NULL;
+ SPObject *elemref = nullptr;
SPDocument * document = SP_ACTIVE_DOCUMENT;
Glib::ustring mask_id = (Glib::ustring)mask->getId();
Glib::ustring filter_id = mask_id + (Glib::ustring)"_inverse";
diff --git a/src/live_effects/lpe-powerstroke.cpp b/src/live_effects/lpe-powerstroke.cpp
index 1d64e9042..ce240ab1e 100644
--- a/src/live_effects/lpe-powerstroke.cpp
+++ b/src/live_effects/lpe-powerstroke.cpp
@@ -450,12 +450,12 @@ static Geom::Path path_from_piecewise_fix_cusps( Geom::Piecewise<Geom::D2<Geom::
if (arc0) {
build_from_sbasis(pb,arc0->toSBasis(), tol, false);
delete arc0;
- arc0 = NULL;
+ arc0 = nullptr;
}
if (arc1) {
build_from_sbasis(pb,arc1->toSBasis(), tol, false);
delete arc1;
- arc1 = NULL;
+ arc1 = nullptr;
}
break;
diff --git a/src/live_effects/lpe-roughen.cpp b/src/live_effects/lpe-roughen.cpp
index e44688baa..37a94343b 100644
--- a/src/live_effects/lpe-roughen.cpp
+++ b/src/live_effects/lpe-roughen.cpp
@@ -222,7 +222,7 @@ void LPERoughen::doEffect(SPCurve *curve)
}
}
while (curve_it1 != curve_endit) {
- Geom::CubicBezier const *cubic = NULL;
+ Geom::CubicBezier const *cubic = nullptr;
cubic = dynamic_cast<Geom::CubicBezier const *>(&*curve_it1);
if (cubic) {
nCurve->curveto((*cubic)[1] + last_move, (*cubic)[2], curve_it1->finalPoint());
diff --git a/src/live_effects/lpe-ruler.cpp b/src/live_effects/lpe-ruler.cpp
index 7726af176..0cda15b81 100644
--- a/src/live_effects/lpe-ruler.cpp
+++ b/src/live_effects/lpe-ruler.cpp
@@ -79,7 +79,7 @@ LPERuler::ruler_mark(Geom::Point const &A, Geom::Point const &n, MarkType const
double real_mark_length = mark_length;
SPDocument * document = SP_ACTIVE_DOCUMENT;
- SPNamedView *nv = sp_document_namedview(document, NULL);
+ SPNamedView *nv = sp_document_namedview(document, nullptr);
Glib::ustring display_unit = nv->display_units->abbr;
real_mark_length = Inkscape::Util::Quantity::convert(real_mark_length, unit.get_abbreviation(), display_unit.c_str());
double real_minor_mark_length = minor_mark_length;
@@ -134,7 +134,7 @@ LPERuler::doEffect_pwd2 (Geom::Piecewise<Geom::D2<Geom::SBasis> > const & pwd2_i
double real_mark_distance = mark_distance;
SPDocument * document = SP_ACTIVE_DOCUMENT;
- SPNamedView *nv = sp_document_namedview(document, NULL);
+ SPNamedView *nv = sp_document_namedview(document, nullptr);
Glib::ustring display_unit = nv->display_units->abbr;
real_mark_distance = Inkscape::Util::Quantity::convert(real_mark_distance, unit.get_abbreviation(), display_unit.c_str());
diff --git a/src/live_effects/lpe-show_handles.cpp b/src/live_effects/lpe-show_handles.cpp
index 35da722d0..aa4b363f9 100644
--- a/src/live_effects/lpe-show_handles.cpp
+++ b/src/live_effects/lpe-show_handles.cpp
@@ -124,7 +124,7 @@ LPEShowHandles::generateHelperPath(Geom::PathVector result)
return;
}
- Geom::CubicBezier const *cubic = NULL;
+ Geom::CubicBezier const *cubic = nullptr;
for (Geom::PathVector::iterator path_it = result.begin(); path_it != result.end(); ++path_it) {
//Si está vacío...
if (path_it->empty()) {
diff --git a/src/live_effects/lpe-simplify.cpp b/src/live_effects/lpe-simplify.cpp
index e676f37a0..e640475dc 100644
--- a/src/live_effects/lpe-simplify.cpp
+++ b/src/live_effects/lpe-simplify.cpp
@@ -153,7 +153,7 @@ LPESimplify::generateHelperPathAndSmooth(Geom::PathVector &result)
return;
}
Geom::PathVector tmp_path;
- Geom::CubicBezier const *cubic = NULL;
+ Geom::CubicBezier const *cubic = nullptr;
for (Geom::PathVector::iterator path_it = result.begin(); path_it != result.end(); ++path_it) {
if (path_it->empty()) {
continue;
diff --git a/src/live_effects/lpe-tangent_to_curve.cpp b/src/live_effects/lpe-tangent_to_curve.cpp
index ee2e6552b..6c34fc9e6 100644
--- a/src/live_effects/lpe-tangent_to_curve.cpp
+++ b/src/live_effects/lpe-tangent_to_curve.cpp
@@ -97,19 +97,19 @@ void
LPETangentToCurve::addKnotHolderEntities(KnotHolder *knotholder, SPItem *item) {
{
KnotHolderEntity *e = new TtC::KnotHolderEntityAttachPt(this);
- e->create( NULL, item, knotholder, Inkscape::CTRL_TYPE_UNKNOWN,
+ e->create( nullptr, item, knotholder, Inkscape::CTRL_TYPE_UNKNOWN,
_("Adjust the point of attachment of the tangent") );
knotholder->add(e);
}
{
KnotHolderEntity *e = new TtC::KnotHolderEntityLeftEnd(this);
- e->create( NULL, item, knotholder, Inkscape::CTRL_TYPE_UNKNOWN,
+ e->create( nullptr, item, knotholder, Inkscape::CTRL_TYPE_UNKNOWN,
_("Adjust the <b>left</b> end of the tangent") );
knotholder->add(e);
}
{
KnotHolderEntity *e = new TtC::KnotHolderEntityRightEnd(this);
- e->create( NULL, item, knotholder, Inkscape::CTRL_TYPE_UNKNOWN,
+ e->create( nullptr, item, knotholder, Inkscape::CTRL_TYPE_UNKNOWN,
_("Adjust the <b>right</b> end of the tangent") );
knotholder->add(e);
}
diff --git a/src/live_effects/lpe-taperstroke.cpp b/src/live_effects/lpe-taperstroke.cpp
index 212485ecf..63225d745 100644
--- a/src/live_effects/lpe-taperstroke.cpp
+++ b/src/live_effects/lpe-taperstroke.cpp
@@ -450,11 +450,11 @@ Piecewise<D2<SBasis> > stretch_along(Piecewise<D2<SBasis> > pwd2_in, Geom::Path
void LPETaperStroke::addKnotHolderEntities(KnotHolder *knotholder, SPItem *item)
{
KnotHolderEntity *e = new TpS::KnotHolderEntityAttachBegin(this);
- e->create(NULL, item, knotholder, Inkscape::CTRL_TYPE_UNKNOWN, _("Start point of the taper"), SP_KNOT_SHAPE_CIRCLE);
+ e->create(nullptr, item, knotholder, Inkscape::CTRL_TYPE_UNKNOWN, _("Start point of the taper"), SP_KNOT_SHAPE_CIRCLE);
knotholder->add(e);
KnotHolderEntity *f = new TpS::KnotHolderEntityAttachEnd(this);
- f->create(NULL, item, knotholder, Inkscape::CTRL_TYPE_UNKNOWN, _("End point of the taper"), SP_KNOT_SHAPE_CIRCLE);
+ f->create(nullptr, item, knotholder, Inkscape::CTRL_TYPE_UNKNOWN, _("End point of the taper"), SP_KNOT_SHAPE_CIRCLE);
knotholder->add(f);
}
diff --git a/src/live_effects/lpeobject-reference.cpp b/src/live_effects/lpeobject-reference.cpp
index edede5ca1..14472d001 100644
--- a/src/live_effects/lpeobject-reference.cpp
+++ b/src/live_effects/lpeobject-reference.cpp
@@ -25,12 +25,12 @@ static void lpeobjectreference_source_modified(SPObject *iSource, guint flags, L
LPEObjectReference::LPEObjectReference(SPObject* i_owner) : URIReference(i_owner)
{
owner=i_owner;
- lpeobject_href = NULL;
- lpeobject_repr = NULL;
- lpeobject = NULL;
+ lpeobject_href = nullptr;
+ lpeobject_repr = nullptr;
+ lpeobject = nullptr;
_changed_connection = changedSignal().connect(sigc::bind(sigc::ptr_fun(lpeobjectreference_href_changed), this)); // listening to myself, this should be virtual instead
- user_unlink = NULL;
+ user_unlink = nullptr;
}
LPEObjectReference::~LPEObjectReference(void)
@@ -80,7 +80,7 @@ LPEObjectReference::unlink(void)
{
if (lpeobject_href) {
g_free(lpeobject_href);
- lpeobject_href = NULL;
+ lpeobject_href = nullptr;
}
detach();
}
@@ -88,7 +88,7 @@ LPEObjectReference::unlink(void)
void
LPEObjectReference::start_listening(LivePathEffectObject* to)
{
- if ( to == NULL ) {
+ if ( to == nullptr ) {
return;
}
lpeobject = to;
@@ -102,8 +102,8 @@ LPEObjectReference::quit_listening(void)
{
_modified_connection.disconnect();
_delete_connection.disconnect();
- lpeobject_repr = NULL;
- lpeobject = NULL;
+ lpeobject_repr = nullptr;
+ lpeobject = nullptr;
}
static void
diff --git a/src/live_effects/lpeobject.cpp b/src/live_effects/lpeobject.cpp
index bc5ff0576..c05d00d60 100644
--- a/src/live_effects/lpeobject.cpp
+++ b/src/live_effects/lpeobject.cpp
@@ -22,17 +22,17 @@
static void livepatheffect_on_repr_attr_changed (Inkscape::XML::Node * repr, const gchar *key, const gchar *oldval, const gchar *newval, bool is_interactive, void * data);
static Inkscape::XML::NodeEventVector const livepatheffect_repr_events = {
- NULL, /* child_added */
- NULL, /* child_removed */
+ nullptr, /* child_added */
+ nullptr, /* child_removed */
livepatheffect_on_repr_attr_changed,
- NULL, /* content_changed */
- NULL /* order_changed */
+ nullptr, /* content_changed */
+ nullptr /* order_changed */
};
LivePathEffectObject::LivePathEffectObject()
: SPObject(), effecttype(Inkscape::LivePathEffect::INVALID_LPE), effecttype_set(false),
- lpe(NULL)
+ lpe(nullptr)
{
#ifdef LIVEPATHEFFECT_VERBOSE
g_message("Init livepatheffectobject");
@@ -46,7 +46,7 @@ LivePathEffectObject::~LivePathEffectObject() {
* Virtual build: set livepatheffect attributes from its associated XML node.
*/
void LivePathEffectObject::build(SPDocument *document, Inkscape::XML::Node *repr) {
- g_assert(this != NULL);
+ g_assert(this != nullptr);
g_assert(SP_IS_OBJECT(this));
SPObject::build(document, repr);
@@ -85,7 +85,7 @@ void LivePathEffectObject::release() {
if (this->lpe) {
delete this->lpe;
- this->lpe = NULL;
+ this->lpe = nullptr;
}
this->effecttype = Inkscape::LivePathEffect::INVALID_LPE;
@@ -105,7 +105,7 @@ void LivePathEffectObject::set(unsigned key, gchar const *value) {
case SP_PROP_PATH_EFFECT:
if (this->lpe) {
delete this->lpe;
- this->lpe = NULL;
+ this->lpe = nullptr;
}
if ( value && Inkscape::LivePathEffect::LPETypeConverter.is_valid_key(value) ) {
@@ -114,7 +114,7 @@ void LivePathEffectObject::set(unsigned key, gchar const *value) {
this->effecttype_set = true;
} else {
this->effecttype = Inkscape::LivePathEffect::INVALID_LPE;
- this->lpe = NULL;
+ this->lpe = nullptr;
this->effecttype_set = false;
}
@@ -180,7 +180,7 @@ LivePathEffectObject *LivePathEffectObject::fork_private_if_necessary(unsigned i
Inkscape::XML::Document *xml_doc = doc->getReprDoc();
Inkscape::XML::Node *dup_repr = this->getRepr()->duplicate(xml_doc);
- doc->getDefs()->getRepr()->addChild(dup_repr, NULL);
+ doc->getDefs()->getRepr()->addChild(dup_repr, nullptr);
LivePathEffectObject *lpeobj_new = LIVEPATHEFFECT( doc->getObjectByRepr(dup_repr) );
Inkscape::GC::release(dup_repr);
diff --git a/src/live_effects/parameter/array.cpp b/src/live_effects/parameter/array.cpp
index 7470f54cd..3c1498fc3 100644
--- a/src/live_effects/parameter/array.cpp
+++ b/src/live_effects/parameter/array.cpp
@@ -57,7 +57,7 @@ ArrayParam<std::vector<Satellite > >::readsvg(const gchar * str)
}
gchar ** strarray = g_strsplit(str, "@", 0);
gchar ** iter = strarray;
- while (*iter != NULL) {
+ while (*iter != nullptr) {
gchar ** strsubarray = g_strsplit(*iter, ",", 8);
if (*strsubarray[7]) {//steps always > 0
Satellite *satellite = new Satellite();
diff --git a/src/live_effects/parameter/array.h b/src/live_effects/parameter/array.h
index be19889b3..156de2f81 100644
--- a/src/live_effects/parameter/array.h
+++ b/src/live_effects/parameter/array.h
@@ -46,14 +46,14 @@ public:
}
Gtk::Widget * param_newWidget() override {
- return NULL;
+ return nullptr;
}
bool param_readSVGValue(const gchar * strvalue) override {
_vector.clear();
gchar ** strarray = g_strsplit(strvalue, "|", 0);
gchar ** iter = strarray;
- while (*iter != NULL) {
+ while (*iter != nullptr) {
_vector.push_back( readsvg(*iter) );
iter++;
}
diff --git a/src/live_effects/parameter/bool.cpp b/src/live_effects/parameter/bool.cpp
index bfbda2bfd..2e8c4dbcc 100644
--- a/src/live_effects/parameter/bool.cpp
+++ b/src/live_effects/parameter/bool.cpp
@@ -84,7 +84,7 @@ BoolParam::param_newWidget()
checkwdg->set_undo_parameters(SP_VERB_DIALOG_LIVE_PATH_EFFECT, _("Change bool parameter"));
return dynamic_cast<Gtk::Widget *> (checkwdg);
} else {
- return NULL;
+ return nullptr;
}
}
diff --git a/src/live_effects/parameter/colorpicker.cpp b/src/live_effects/parameter/colorpicker.cpp
index d4ebdaa1c..ec2b18389 100644
--- a/src/live_effects/parameter/colorpicker.cpp
+++ b/src/live_effects/parameter/colorpicker.cpp
@@ -43,7 +43,7 @@ ColorPickerParam::param_set_default()
static guint32 sp_read_color_alpha(gchar const *str, guint32 def)
{
guint32 val = 0;
- if (str == NULL) return def;
+ if (str == nullptr) return def;
while ((*str <= ' ') && *str) str++;
if (!*str) return def;
diff --git a/src/live_effects/parameter/hidden.cpp b/src/live_effects/parameter/hidden.cpp
index 5a21f572b..fd062d277 100644
--- a/src/live_effects/parameter/hidden.cpp
+++ b/src/live_effects/parameter/hidden.cpp
@@ -69,7 +69,7 @@ HiddenParam::param_getDefaultSVGValue() const
Gtk::Widget *
HiddenParam::param_newWidget()
{
- return NULL;
+ return nullptr;
}
void
diff --git a/src/live_effects/parameter/item.cpp b/src/live_effects/parameter/item.cpp
index 2107a5912..c22a3df33 100644
--- a/src/live_effects/parameter/item.cpp
+++ b/src/live_effects/parameter/item.cpp
@@ -40,7 +40,7 @@ ItemParam::ItemParam( const Glib::ustring& label, const Glib::ustring& tip,
Effect* effect, const gchar * default_value)
: Parameter(label, tip, key, wr, effect),
changed(true),
- href(NULL),
+ href(nullptr),
ref( (SPObject*)effect->getLPEObj() )
{
last_transform = Geom::identity();
@@ -154,7 +154,7 @@ ItemParam::addCanvasIndicators(SPLPEItem const*/*lpeitem*/, std::vector<Geom::Pa
void
ItemParam::start_listening(SPObject * to)
{
- if ( to == NULL ) {
+ if ( to == nullptr ) {
return;
}
linked_delete_connection = to->connectDelete(sigc::mem_fun(*this, &ItemParam::linked_delete));
@@ -188,7 +188,7 @@ ItemParam::remove_link()
if (href) {
ref.detach();
g_free(href);
- href = NULL;
+ href = nullptr;
}
}
diff --git a/src/live_effects/parameter/message.cpp b/src/live_effects/parameter/message.cpp
index 03eb2219f..a6e919558 100644
--- a/src/live_effects/parameter/message.cpp
+++ b/src/live_effects/parameter/message.cpp
@@ -20,7 +20,7 @@ MessageParam::MessageParam( const Glib::ustring& label, const Glib::ustring& tip
message(default_message),
defmessage(default_message)
{
- _label = NULL;
+ _label = nullptr;
_min_height = -1;
}
diff --git a/src/live_effects/parameter/originalitem.cpp b/src/live_effects/parameter/originalitem.cpp
index 52e4c2fd8..820c4d6b9 100644
--- a/src/live_effects/parameter/originalitem.cpp
+++ b/src/live_effects/parameter/originalitem.cpp
@@ -105,7 +105,7 @@ OriginalItemParam::on_select_original_button_click()
{
SPDesktop *desktop = SP_ACTIVE_DESKTOP;
SPItem *original = ref.getObject();
- if (desktop == NULL || original == NULL) {
+ if (desktop == nullptr || original == nullptr) {
return;
}
Inkscape::Selection *selection = desktop->getSelection();
diff --git a/src/live_effects/parameter/originalitem.h b/src/live_effects/parameter/originalitem.h
index 4b285f8e1..d070161ac 100644
--- a/src/live_effects/parameter/originalitem.h
+++ b/src/live_effects/parameter/originalitem.h
@@ -23,7 +23,7 @@ public:
Inkscape::UI::Widget::Registry* wr,
Effect* effect);
~OriginalItemParam() override;
- bool linksToItem() const { return (href != NULL); }
+ bool linksToItem() const { return (href != nullptr); }
SPItem * getObject() const { return ref.getObject(); }
Gtk::Widget * param_newWidget() override;
diff --git a/src/live_effects/parameter/originalitemarray.cpp b/src/live_effects/parameter/originalitemarray.cpp
index 5a0d67d26..3116b1f9c 100644
--- a/src/live_effects/parameter/originalitemarray.cpp
+++ b/src/live_effects/parameter/originalitemarray.cpp
@@ -323,7 +323,7 @@ void OriginalItemArrayParam::unlink(ItemAndActive* to)
to->ref.detach();
if (to->href) {
g_free(to->href);
- to->href = NULL;
+ to->href = nullptr;
}
}
@@ -398,12 +398,12 @@ bool OriginalItemArrayParam::param_readSVGValue(const gchar* strvalue)
_store->clear();
gchar ** strarray = g_strsplit(strvalue, "|", 0);
- for (gchar ** iter = strarray; *iter != NULL; iter++) {
+ for (gchar ** iter = strarray; *iter != nullptr; iter++) {
if ((*iter)[0] == '#') {
gchar ** substrarray = g_strsplit(*iter, ",", 0);
ItemAndActive* w = new ItemAndActive((SPObject *)param_effect->getLPEObj());
w->href = g_strdup(*substrarray);
- w->actived = *(substrarray+1) != NULL && (*(substrarray+1))[0] == '1';
+ w->actived = *(substrarray+1) != nullptr && (*(substrarray+1))[0] == '1';
w->linked_changed_connection = w->ref.changedSignal().connect(sigc::bind<ItemAndActive *>(sigc::mem_fun(*this, &OriginalItemArrayParam::linked_changed), w));
w->ref.attach(URI(w->href));
diff --git a/src/live_effects/parameter/originalitemarray.h b/src/live_effects/parameter/originalitemarray.h
index edb5a3be5..968aeaff0 100644
--- a/src/live_effects/parameter/originalitemarray.h
+++ b/src/live_effects/parameter/originalitemarray.h
@@ -32,7 +32,7 @@ namespace LivePathEffect {
class ItemAndActive {
public:
ItemAndActive(SPObject *owner)
- : href(NULL),
+ : href(nullptr),
ref(owner),
actived(true)
{
diff --git a/src/live_effects/parameter/originalpath.cpp b/src/live_effects/parameter/originalpath.cpp
index 018e1e69e..5ad5546da 100644
--- a/src/live_effects/parameter/originalpath.cpp
+++ b/src/live_effects/parameter/originalpath.cpp
@@ -90,7 +90,7 @@ OriginalPathParam::param_newWidget()
void
OriginalPathParam::linked_modified_callback(SPObject *linked_obj, guint /*flags*/)
{
- SPCurve *curve = NULL;
+ SPCurve *curve = nullptr;
if (SP_IS_SHAPE(linked_obj)) {
if (_from_original_d) {
curve = SP_SHAPE(linked_obj)->getCurveForEdit();
@@ -102,7 +102,7 @@ OriginalPathParam::linked_modified_callback(SPObject *linked_obj, guint /*flags*
curve = SP_TEXT(linked_obj)->getNormalizedBpath();
}
- if (curve == NULL) {
+ if (curve == nullptr) {
// curve invalid, set empty pathvector
_pathvector = Geom::PathVector();
} else {
@@ -128,7 +128,7 @@ OriginalPathParam::on_select_original_button_click()
{
SPDesktop *desktop = SP_ACTIVE_DESKTOP;
SPItem *original = ref.getObject();
- if (desktop == NULL || original == NULL) {
+ if (desktop == nullptr || original == nullptr) {
return;
}
Inkscape::Selection *selection = desktop->getSelection();
diff --git a/src/live_effects/parameter/originalpath.h b/src/live_effects/parameter/originalpath.h
index bd7b10741..4432d063d 100644
--- a/src/live_effects/parameter/originalpath.h
+++ b/src/live_effects/parameter/originalpath.h
@@ -24,7 +24,7 @@ public:
Effect* effect);
~OriginalPathParam() override;
- bool linksToPath() const { return (href != NULL); }
+ bool linksToPath() const { return (href != nullptr); }
SPItem * getObject() const { return ref.getObject(); }
Gtk::Widget * param_newWidget() override;
diff --git a/src/live_effects/parameter/originalpatharray.cpp b/src/live_effects/parameter/originalpatharray.cpp
index 2091c4d71..f9e56c8f3 100644
--- a/src/live_effects/parameter/originalpatharray.cpp
+++ b/src/live_effects/parameter/originalpatharray.cpp
@@ -363,7 +363,7 @@ void OriginalPathArrayParam::unlink(PathAndDirectionAndVisible* to)
to->_pathvector = Geom::PathVector();
if (to->href) {
g_free(to->href);
- to->href = NULL;
+ to->href = nullptr;
}
}
@@ -424,7 +424,7 @@ void OriginalPathArrayParam::setPathVector(SPObject *linked_obj, guint /*flags*/
if (!to) {
return;
}
- SPCurve *curve = NULL;
+ SPCurve *curve = nullptr;
if (SP_IS_SHAPE(linked_obj)) {
SPLPEItem * lpe_item = SP_LPE_ITEM(linked_obj);
if (_from_original_d) {
@@ -451,7 +451,7 @@ void OriginalPathArrayParam::setPathVector(SPObject *linked_obj, guint /*flags*/
curve = SP_TEXT(linked_obj)->getNormalizedBpath();
}
- if (curve == NULL) {
+ if (curve == nullptr) {
// curve invalid, set empty pathvector
to->_pathvector = Geom::PathVector();
} else {
@@ -483,14 +483,14 @@ bool OriginalPathArrayParam::param_readSVGValue(const gchar* strvalue)
_store->clear();
gchar ** strarray = g_strsplit(strvalue, "|", 0);
- for (gchar ** iter = strarray; *iter != NULL; iter++) {
+ for (gchar ** iter = strarray; *iter != nullptr; iter++) {
if ((*iter)[0] == '#') {
gchar ** substrarray = g_strsplit(*iter, ",", 0);
PathAndDirectionAndVisible* w = new PathAndDirectionAndVisible((SPObject *)param_effect->getLPEObj());
w->href = g_strdup(*substrarray);
- w->reversed = *(substrarray+1) != NULL && (*(substrarray+1))[0] == '1';
+ w->reversed = *(substrarray+1) != nullptr && (*(substrarray+1))[0] == '1';
//Like this to make backwards compatible, new value added in 0.93
- w->visibled = *(substrarray+2) == NULL || (*(substrarray+2))[0] == '1';
+ w->visibled = *(substrarray+2) == nullptr || (*(substrarray+2))[0] == '1';
w->linked_changed_connection = w->ref.changedSignal().connect(sigc::bind<PathAndDirectionAndVisible *>(sigc::mem_fun(*this, &OriginalPathArrayParam::linked_changed), w));
w->ref.attach(URI(w->href));
diff --git a/src/live_effects/parameter/originalpatharray.h b/src/live_effects/parameter/originalpatharray.h
index 92edff103..23a41215f 100644
--- a/src/live_effects/parameter/originalpatharray.h
+++ b/src/live_effects/parameter/originalpatharray.h
@@ -32,7 +32,7 @@ namespace LivePathEffect {
class PathAndDirectionAndVisible {
public:
PathAndDirectionAndVisible(SPObject *owner)
- : href(NULL),
+ : href(nullptr),
ref(owner),
_pathvector(Geom::PathVector()),
reversed(false),
diff --git a/src/live_effects/parameter/parameter.cpp b/src/live_effects/parameter/parameter.cpp
index a175359f0..acfe159ab 100644
--- a/src/live_effects/parameter/parameter.cpp
+++ b/src/live_effects/parameter/parameter.cpp
@@ -196,7 +196,7 @@ ScalarParam::param_newWidget()
}
return dynamic_cast<Gtk::Widget *> (rsu);
} else {
- return NULL;
+ return nullptr;
}
}
diff --git a/src/live_effects/parameter/path.cpp b/src/live_effects/parameter/path.cpp
index ab385daa6..649d3a1ef 100644
--- a/src/live_effects/parameter/path.cpp
+++ b/src/live_effects/parameter/path.cpp
@@ -64,7 +64,7 @@ PathParam::PathParam( const Glib::ustring& label, const Glib::ustring& tip,
_pathvector(),
_pwd2(),
must_recalculate_pwd2(false),
- href(NULL),
+ href(nullptr),
ref( (SPObject*)effect->getLPEObj() )
{
defvalue = g_strdup(default_value);
@@ -198,8 +198,8 @@ PathParam::param_newWidget()
Gtk::Label* pLabel = Gtk::manage(new Gtk::Label(param_label));
static_cast<Gtk::HBox*>(_widget)->pack_start(*pLabel, true, true);
pLabel->set_tooltip_text(param_tooltip);
- Gtk::Image * pIcon = NULL;
- Gtk::Button * pButton = NULL;
+ Gtk::Image * pIcon = nullptr;
+ Gtk::Button * pButton = nullptr;
if (_edit_button) {
pIcon = Gtk::manage(new Gtk::Image());
pIcon->set_from_icon_name( INKSCAPE_ICON("tool-node-editor"), Gtk::ICON_SIZE_BUTTON);
@@ -398,7 +398,7 @@ PathParam::emit_changed()
void
PathParam::start_listening(SPObject * to)
{
- if ( to == NULL ) {
+ if ( to == nullptr ) {
return;
}
linked_delete_connection = to->connectDelete(sigc::mem_fun(*this, &PathParam::linked_delete));
@@ -432,7 +432,7 @@ PathParam::remove_link()
if (href) {
ref.detach();
g_free(href);
- href = NULL;
+ href = nullptr;
}
}
@@ -457,7 +457,7 @@ void PathParam::linked_transformed(Geom::Affine const *rel_transf, SPItem *moved
void
PathParam::linked_modified_callback(SPObject *linked_obj, guint /*flags*/)
{
- SPCurve *curve = NULL;
+ SPCurve *curve = nullptr;
if (SP_IS_SHAPE(linked_obj)) {
if (_from_original_d) {
curve = SP_SHAPE(linked_obj)->getCurveForEdit();
@@ -469,7 +469,7 @@ PathParam::linked_modified_callback(SPObject *linked_obj, guint /*flags*/)
curve = SP_TEXT(linked_obj)->getNormalizedBpath();
}
- if (curve == NULL) {
+ if (curve == nullptr) {
// curve invalid, set default value
_pathvector = sp_svg_read_pathv(defvalue);
} else {
@@ -492,7 +492,7 @@ void
PathParam::on_edit_button_click()
{
SPItem * item = SP_ACTIVE_DESKTOP->getSelection()->singleItem();
- if (item != NULL) {
+ if (item != nullptr) {
param_editOncanvas(item, SP_ACTIVE_DESKTOP);
}
}
@@ -505,7 +505,7 @@ PathParam::paste_param_path(const char *svgd)
// remove possible link to path
remove_link();
SPItem * item = SP_ACTIVE_DESKTOP->getSelection()->singleItem();
- if (item != NULL) {
+ if (item != nullptr) {
Geom::PathVector path_clipboard = sp_svg_read_pathv(svgd);
path_clipboard *= item->i2doc_affine().inverse();
svgd = sp_svg_write_path( path_clipboard );
diff --git a/src/live_effects/parameter/point.cpp b/src/live_effects/parameter/point.cpp
index fe0699a19..a195d663b 100644
--- a/src/live_effects/parameter/point.cpp
+++ b/src/live_effects/parameter/point.cpp
@@ -25,7 +25,7 @@ PointParam::PointParam( const Glib::ustring& label, const Glib::ustring& tip,
: Parameter(label, tip, key, wr, effect),
defvalue(default_value),
liveupdate(live_update),
- _knot_entity(NULL)
+ _knot_entity(nullptr)
{
knot_shape = SP_KNOT_SHAPE_DIAMOND;
knot_mode = SP_KNOT_MODE_XOR;
@@ -185,7 +185,7 @@ PointParam::set_oncanvas_looks(SPKnotShapeType shape, SPKnotModeType mode, guint
class PointParamKnotHolderEntity : public KnotHolderEntity {
public:
PointParamKnotHolderEntity(PointParam *p) { this->pparam = p; }
- ~PointParamKnotHolderEntity() override { this->pparam->_knot_entity = NULL;}
+ ~PointParamKnotHolderEntity() override { this->pparam->_knot_entity = nullptr;}
void knot_set(Geom::Point const &p, Geom::Point const &origin, guint state) override;
Geom::Point knot_get() const override;
@@ -239,7 +239,7 @@ PointParam::addKnotHolderEntities(KnotHolder *knotholder, SPItem *item)
{
_knot_entity = new PointParamKnotHolderEntity(this);
// TODO: can we ditch handleTip() etc. because we have access to handle_tip etc. itself???
- _knot_entity->create(NULL, item, knotholder, Inkscape::CTRL_TYPE_UNKNOWN, handleTip(), knot_shape, knot_mode, knot_color);
+ _knot_entity->create(nullptr, item, knotholder, Inkscape::CTRL_TYPE_UNKNOWN, handleTip(), knot_shape, knot_mode, knot_color);
knotholder->add(_knot_entity);
}
diff --git a/src/live_effects/parameter/point.h b/src/live_effects/parameter/point.h
index 4f93b5354..7c620f502 100644
--- a/src/live_effects/parameter/point.h
+++ b/src/live_effects/parameter/point.h
@@ -29,7 +29,7 @@ public:
const Glib::ustring& key,
Inkscape::UI::Widget::Registry* wr,
Effect* effect,
- const gchar *handle_tip = NULL,// tip for automatically associated on-canvas handle
+ const gchar *handle_tip = nullptr,// tip for automatically associated on-canvas handle
Geom::Point default_value = Geom::Point(0,0),
bool live_update = true );
~PointParam() override;
diff --git a/src/live_effects/parameter/powerstrokepointarray.cpp b/src/live_effects/parameter/powerstrokepointarray.cpp
index cf4adc5fd..0857deab5 100644
--- a/src/live_effects/parameter/powerstrokepointarray.cpp
+++ b/src/live_effects/parameter/powerstrokepointarray.cpp
@@ -39,7 +39,7 @@ PowerStrokePointArrayParam::~PowerStrokePointArrayParam()
Gtk::Widget *
PowerStrokePointArrayParam::param_newWidget()
{
- return NULL;
+ return nullptr;
}
void PowerStrokePointArrayParam::param_transform_multiply(Geom::Affine const &postmul, bool /*set*/)
@@ -280,7 +280,7 @@ void PowerStrokePointArrayParam::addKnotHolderEntities(KnotHolder *knotholder, S
{
for (unsigned int i = 0; i < _vector.size(); ++i) {
PowerStrokePointArrayParamKnotHolderEntity *e = new PowerStrokePointArrayParamKnotHolderEntity(this, i);
- e->create(NULL, item, knotholder, Inkscape::CTRL_TYPE_UNKNOWN,
+ e->create(nullptr, item, knotholder, Inkscape::CTRL_TYPE_UNKNOWN,
_("<b>Stroke width control point</b>: drag to alter the stroke width. <b>Ctrl+click</b> adds a control point, <b>Ctrl+Alt+click</b> deletes it, <b>Shift+click</b> launches width dialog."),
knot_shape, knot_mode, knot_color);
knotholder->add(e);
diff --git a/src/live_effects/parameter/satellitesarray.cpp b/src/live_effects/parameter/satellitesarray.cpp
index c6f5492d1..10ad0df45 100644
--- a/src/live_effects/parameter/satellitesarray.cpp
+++ b/src/live_effects/parameter/satellitesarray.cpp
@@ -26,7 +26,7 @@ SatellitesArrayParam::SatellitesArrayParam(const Glib::ustring &label,
const Glib::ustring &key,
Inkscape::UI::Widget::Registry *wr,
Effect *effect)
- : ArrayParam<std::vector<Satellite> >(label, tip, key, wr, effect, 0), _knoth(NULL)
+ : ArrayParam<std::vector<Satellite> >(label, tip, key, wr, effect, 0), _knoth(nullptr)
{
_knot_shape = SP_KNOT_SHAPE_DIAMOND;
_knot_mode = SP_KNOT_MODE_XOR;
@@ -36,7 +36,7 @@ SatellitesArrayParam::SatellitesArrayParam(const Glib::ustring &label,
_global_knot_hide = false;
_current_zoom = 0;
_effectType = FILLET_CHAMFER;
- _last_pathvector_satellites = NULL;
+ _last_pathvector_satellites = nullptr;
param_widget_is_visible(false);
}
@@ -269,7 +269,7 @@ void SatellitesArrayParam::addKnotHolderEntities(KnotHolder *knotholder,
"<b>Ctrl+Alt+Click</b> reset");
}
FilletChamferKnotHolderEntity *e = new FilletChamferKnotHolderEntity(this, index);
- e->create(NULL, item, knotholder, Inkscape::CTRL_TYPE_UNKNOWN, _(tip),_knot_shape, _knot_mode, _knot_color);
+ e->create(nullptr, item, knotholder, Inkscape::CTRL_TYPE_UNKNOWN, _(tip),_knot_shape, _knot_mode, _knot_color);
knotholder->add(e);
}
index++;
diff --git a/src/live_effects/parameter/satellitesarray.h b/src/live_effects/parameter/satellitesarray.h
index 30e196e41..005ea63ff 100644
--- a/src/live_effects/parameter/satellitesarray.h
+++ b/src/live_effects/parameter/satellitesarray.h
@@ -38,7 +38,7 @@ public:
Gtk::Widget *param_newWidget() override
{
- return NULL;
+ return nullptr;
}
virtual void setHelperSize(int hs);
void addKnotHolderEntities(KnotHolder *knotholder, SPItem *item) override;
@@ -87,7 +87,7 @@ public:
FilletChamferKnotHolderEntity(SatellitesArrayParam *p, size_t index);
~FilletChamferKnotHolderEntity() override
{
- _pparam->_knoth = NULL;
+ _pparam->_knoth = nullptr;
}
void knot_set(Geom::Point const &p, Geom::Point const &origin,
diff --git a/src/live_effects/parameter/text.h b/src/live_effects/parameter/text.h
index cd1176bc2..fda470638 100644
--- a/src/live_effects/parameter/text.h
+++ b/src/live_effects/parameter/text.h
@@ -73,9 +73,9 @@ private:
class TextParamInternal : public TextParam {
public:
TextParamInternal(Effect* effect) :
- TextParam("", "", "", NULL, effect) {}
+ TextParam("", "", "", nullptr, effect) {}
- Gtk::Widget * param_newWidget() override { return NULL; }
+ Gtk::Widget * param_newWidget() override { return nullptr; }
};
} //namespace LivePathEffect
diff --git a/src/live_effects/parameter/togglebutton.cpp b/src/live_effects/parameter/togglebutton.cpp
index bb9d9a90e..b5f7f5998 100644
--- a/src/live_effects/parameter/togglebutton.cpp
+++ b/src/live_effects/parameter/togglebutton.cpp
@@ -29,7 +29,7 @@ ToggleButtonParam::ToggleButtonParam( const Glib::ustring& label, const Glib::us
: Parameter(label, tip, key, wr, effect), value(default_value), defvalue(default_value),
inactive_label(inactive_label), _icon_active(_icon_active), _icon_inactive(_icon_inactive), _icon_size(_icon_size)
{
- checkwdg = NULL;
+ checkwdg = nullptr;
}
ToggleButtonParam::~ToggleButtonParam()
@@ -107,7 +107,7 @@ ToggleButtonParam::param_newWidget()
_icon_inactive = _icon_active;
}
gtk_widget_show(box_button);
- GtkWidget *icon_button = NULL;
+ GtkWidget *icon_button = nullptr;
if(!value){
icon_button = gtk_image_new_from_icon_name(_icon_inactive, _icon_size);
} else {
@@ -156,7 +156,7 @@ ToggleButtonParam::refresh_button()
}
}
if ( _icon_active ) {
- GdkPixbuf * icon_pixbuf = NULL;
+ GdkPixbuf * icon_pixbuf = nullptr;
Gtk::Image *im = dynamic_cast<Gtk::Image*>(children[0]);
Gtk::IconSize is(_icon_size);
if (!im) return;
diff --git a/src/live_effects/parameter/togglebutton.h b/src/live_effects/parameter/togglebutton.h
index 7476698f5..29ee72203 100644
--- a/src/live_effects/parameter/togglebutton.h
+++ b/src/live_effects/parameter/togglebutton.h
@@ -31,8 +31,8 @@ public:
Effect* effect,
bool default_value = false,
const Glib::ustring& inactive_label = "",
- char const * icon_active = NULL,
- char const * icon_inactive = NULL,
+ char const * icon_active = nullptr,
+ char const * icon_inactive = nullptr,
GtkIconSize icon_size = GTK_ICON_SIZE_SMALL_TOOLBAR);
~ToggleButtonParam() override;
diff --git a/src/live_effects/parameter/vector.cpp b/src/live_effects/parameter/vector.cpp
index 56895276c..8018ed618 100644
--- a/src/live_effects/parameter/vector.cpp
+++ b/src/live_effects/parameter/vector.cpp
@@ -216,11 +216,11 @@ void
VectorParam::addKnotHolderEntities(KnotHolder *knotholder, SPItem *item)
{
VectorParamKnotHolderEntity_Origin *origin_e = new VectorParamKnotHolderEntity_Origin(this);
- origin_e->create(NULL, item, knotholder, Inkscape::CTRL_TYPE_UNKNOWN, handleTip(), ori_knot_shape, ori_knot_mode, ori_knot_color);
+ origin_e->create(nullptr, item, knotholder, Inkscape::CTRL_TYPE_UNKNOWN, handleTip(), ori_knot_shape, ori_knot_mode, ori_knot_color);
knotholder->add(origin_e);
VectorParamKnotHolderEntity_Vector *vector_e = new VectorParamKnotHolderEntity_Vector(this);
- vector_e->create(NULL, item, knotholder, Inkscape::CTRL_TYPE_UNKNOWN, handleTip(), vec_knot_shape, vec_knot_mode, vec_knot_color);
+ vector_e->create(nullptr, item, knotholder, Inkscape::CTRL_TYPE_UNKNOWN, handleTip(), vec_knot_shape, vec_knot_mode, vec_knot_color);
knotholder->add(vector_e);
}