diff options
| author | Markus Engel <markus.engel@tum.de> | 2014-07-22 19:16:52 +0000 |
|---|---|---|
| committer | Markus Engel <markus.engel@tum.de> | 2014-07-22 19:16:52 +0000 |
| commit | d7c36cd293ee35f53a5b47f2795b061888d4f79b (patch) | |
| tree | de6360804cfdec65afcd11945db38051bd760817 /src | |
| parent | Replaced some abs/fabs with std::abs. (diff) | |
| download | inkscape-d7c36cd293ee35f53a5b47f2795b061888d4f79b.tar.gz inkscape-d7c36cd293ee35f53a5b47f2795b061888d4f79b.zip | |
Fixed some logic errors; clang warnings.
(bzr r13460)
Diffstat (limited to 'src')
| -rw-r--r-- | src/sp-item.cpp | 2 | ||||
| -rw-r--r-- | src/sp-lpe-item.cpp | 4 | ||||
| -rw-r--r-- | src/style-internal.cpp | 8 | ||||
| -rw-r--r-- | src/ui/dialog/template-widget.cpp | 2 | ||||
| -rw-r--r-- | src/ui/widget/style-swatch.cpp | 2 |
5 files changed, 7 insertions, 11 deletions
diff --git a/src/sp-item.cpp b/src/sp-item.cpp index 0cdff6546..698559a9f 100644 --- a/src/sp-item.cpp +++ b/src/sp-item.cpp @@ -1264,7 +1264,7 @@ void SPItem::adjust_paint_recursive (Geom::Affine advertized_transform, Geom::Af // Within text, we do not fork gradients, and so must not recurse to avoid double compensation; // also we do not recurse into clones, because a clone's child is the ghost of its original - // we must not touch it - if (!(this && (SP_IS_TEXT(this) || SP_IS_USE(this)))) { + if (!(SP_IS_TEXT(this) || SP_IS_USE(this))) { for (SPObject *o = children; o != NULL; o = o->next) { if (SP_IS_ITEM(o)) { // At the level of the transformed item, t_ancestors is identity; diff --git a/src/sp-lpe-item.cpp b/src/sp-lpe-item.cpp index 321d2fc42..800b31f87 100644 --- a/src/sp-lpe-item.cpp +++ b/src/sp-lpe-item.cpp @@ -212,10 +212,6 @@ Inkscape::XML::Node* SPLPEItem::write(Inkscape::XML::Document *xml_doc, Inkscape * returns true when LPE was successful. */ bool SPLPEItem::performPathEffect(SPCurve *curve) { - if (!this) { - return false; - } - if (!curve) { return false; } diff --git a/src/style-internal.cpp b/src/style-internal.cpp index 6a56d75c0..ae70fc10d 100644 --- a/src/style-internal.cpp +++ b/src/style-internal.cpp @@ -270,18 +270,18 @@ SPILength::read( gchar const *str ) { } else if (!strcmp(e, "em")) { /* EM square */ unit = SP_CSS_UNIT_EM; - if( style && &style->font_size ) { + if( style ) { computed = value * style->font_size.computed; } else { - computed = value * style->font_size.font_size_default; + computed = value * SPIFontSize::font_size_default; } } else if (!strcmp(e, "ex")) { /* ex square */ unit = SP_CSS_UNIT_EX; - if( style && &style->font_size ) { + if( style ) { computed = value * style->font_size.computed * 0.5; // FIXME } else { - computed = value * style->font_size.font_size_default * 0.5; + computed = value * SPIFontSize::font_size_default * 0.5; } } else if (!strcmp(e, "%")) { /* Percentage */ diff --git a/src/ui/dialog/template-widget.cpp b/src/ui/dialog/template-widget.cpp index ef91962d4..9758b35ac 100644 --- a/src/ui/dialog/template-widget.cpp +++ b/src/ui/dialog/template-widget.cpp @@ -120,7 +120,7 @@ void TemplateWidget::_displayTemplateDetails() if (_current_template.long_description != "") message += _("Description: ") + _current_template.long_description + "\n\n"; - if (~_current_template.keywords.empty()){ + if (!_current_template.keywords.empty()){ message += _("Keywords: "); for (std::set<Glib::ustring>::iterator it = _current_template.keywords.begin(); it != _current_template.keywords.end(); ++it) message += *it + " "; diff --git a/src/ui/widget/style-swatch.cpp b/src/ui/widget/style-swatch.cpp index a33c1d09f..98f4e47cd 100644 --- a/src/ui/widget/style-swatch.cpp +++ b/src/ui/widget/style-swatch.cpp @@ -261,7 +261,7 @@ void StyleSwatch::setStyle(SPCSSAttr *css) Glib::ustring css_string; sp_repr_css_write_string (_css, css_string); SPStyle *temp_spstyle = sp_style_new(SP_ACTIVE_DOCUMENT); - if (~css_string.empty()) { + if (!css_string.empty()) { sp_style_merge_from_style_string (temp_spstyle, css_string.c_str()); } |
