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/document.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/document.cpp') diff --git a/src/document.cpp b/src/document.cpp index cba919cee..be0c556f0 100644 --- a/src/document.cpp +++ b/src/document.cpp @@ -1820,7 +1820,7 @@ void SPDocument::_importDefsNode(SPDocument *source, Inkscape::XML::Node *defs, if (src && SP_IS_GRADIENT(src)) { SPGradient *s_gr = SP_GRADIENT(src); for (auto& trg: getDefs()->children) { - if (&trg && (src != &trg) && SP_IS_GRADIENT(&trg)) { + if ((src != &trg) && SP_IS_GRADIENT(&trg)) { SPGradient *t_gr = SP_GRADIENT(&trg); if (t_gr && s_gr->isEquivalent(t_gr)) { // Change object references to the existing equivalent gradient @@ -1891,7 +1891,7 @@ void SPDocument::_importDefsNode(SPDocument *source, Inkscape::XML::Node *defs, // Check that it really is a duplicate for (auto& trg: getDefs()->children) { - if(&trg && SP_IS_SYMBOL(&trg) && src != &trg ) { + if (SP_IS_SYMBOL(&trg) && src != &trg) { std::string id2 = trg.getRepr()->attribute("id"); if( !id.compare( id2 ) ) { -- cgit v1.2.3