From 7308f9e1e734fc54661b3d79c4ff8e8fbeb84867 Mon Sep 17 00:00:00 2001 From: Thomas Holder Date: Sun, 3 Nov 2019 20:02:46 +0100 Subject: refactor: Eliminate SPIString::value_default - eliminate value_default - make value private (-> _value) - add value() method --- src/widgets/stroke-style.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/widgets/stroke-style.cpp') diff --git a/src/widgets/stroke-style.cpp b/src/widgets/stroke-style.cpp index 44f9ac714..815111dd9 100644 --- a/src/widgets/stroke-style.cpp +++ b/src/widgets/stroke-style.cpp @@ -591,7 +591,7 @@ StrokeStyle::forkMarker(SPObject *marker, int loc, SPItem *item) unsigned int refs = 0; for (int i = SP_MARKER_LOC_START; i < SP_MARKER_LOC_QTY; i++) { if (item->style->marker_ptrs[i]->set && - !strcmp(urlId.c_str(), item->style->marker_ptrs[i]->value)) { + !strcmp(urlId.c_str(), item->style->marker_ptrs[i]->value())) { refs++; } } @@ -1277,12 +1277,14 @@ StrokeStyle::updateAllMarkers(std::vector const &objects, bool skip_und if (!all_texts) { for (SPObject *object : simplified_list) { + char const *value = object->style->marker_ptrs[markertype.loc]->value(); + // If the object has this type of markers, - if (object->style->marker_ptrs[markertype.loc]->value == nullptr) + if (value == nullptr) continue; // Extract the name of the marker that the object uses - marker = getMarkerObj(object->style->marker_ptrs[markertype.loc]->value, object->document); + marker = getMarkerObj(value, object->document); // Set the marker color if (update < 0) { -- cgit v1.2.3