From c8f8a5a6c522fcd18b2ca42d4345bc9be115abd3 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Thu, 6 Feb 2020 23:33:38 +0100 Subject: Fix cppcheck warnings and make it work with latest cppcheck 1.90 --- src/apps/projsync.cpp | 2 +- src/projections/isea.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/apps/projsync.cpp b/src/apps/projsync.cpp index 3fab38e1..40848f51 100644 --- a/src/apps/projsync.cpp +++ b/src/apps/projsync.cpp @@ -52,7 +52,7 @@ class ParsingException : public std::exception { std::string msg_; public: - ParsingException(const char *msg) : msg_(msg) {} + explicit ParsingException(const char *msg) : msg_(msg) {} const char *what() const noexcept override { return msg_.c_str(); } }; } diff --git a/src/projections/isea.cpp b/src/projections/isea.cpp index 351739d4..801f2b82 100644 --- a/src/projections/isea.cpp +++ b/src/projections/isea.cpp @@ -733,7 +733,7 @@ static int isea_dddi_ap3odd(struct isea_dgg *g, int quadz, struct isea_pt *pt, quadz += 5; d = 0; } - } else if (quadz >= 6) { + } else /* if (quadz >= 6) */ { if (i == 0 && d == maxcoord) { /* south pole */ quadz = 11; @@ -812,7 +812,7 @@ static int isea_dddi(struct isea_dgg *g, int quadz, struct isea_pt *pt, h.y = -h.z; h.x = 0; } - } else if (quadz >= 6) { + } else /* if (quadz >= 6) */ { if (h.z == 0 && h.x == sidelength) { /* south pole */ quadz = 11; -- cgit v1.2.3