From a20b38f42bae02da47b7cd668320b08653d7daa6 Mon Sep 17 00:00:00 2001 From: Thomas Holder Date: Thu, 22 Aug 2019 19:12:30 +0200 Subject: Eliminate clang warnings -Wconstant-conversion -Wenum-compare-switch -Wpointer-bool-conversion -Wundefined-bool-conversion -Wunused-value Excluding deprecation warnings and 3rdparty directory. --- src/object/filters/sp-filter-primitive.cpp | 2 +- src/object/sp-paint-server.cpp | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'src/object') diff --git a/src/object/filters/sp-filter-primitive.cpp b/src/object/filters/sp-filter-primitive.cpp index 8ed14ff3c..d896da571 100644 --- a/src/object/filters/sp-filter-primitive.cpp +++ b/src/object/filters/sp-filter-primitive.cpp @@ -170,7 +170,7 @@ Inkscape::XML::Node* SPFilterPrimitive::write(Inkscape::XML::Document *doc, Inks int SPFilterPrimitive::read_in(gchar const *name) { - if (!name || !this){ + if (!name){ return Inkscape::Filters::NR_FILTER_SLOT_NOT_SET; } // TODO: are these case sensitive or not? (assumed yes) diff --git a/src/object/sp-paint-server.cpp b/src/object/sp-paint-server.cpp index 286360efb..1ec4db841 100644 --- a/src/object/sp-paint-server.cpp +++ b/src/object/sp-paint-server.cpp @@ -38,9 +38,7 @@ SPPaintServer::~SPPaintServer() = default; bool SPPaintServer::isSwatch() const { - if( this ) // Protect against assumption that "vector" always exists. - return swatch; - return( false ); + return swatch; } -- cgit v1.2.3