aboutsummaryrefslogtreecommitdiff
path: root/src/transformations
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2020-05-17 23:26:24 +0200
committerEven Rouault <even.rouault@spatialys.com>2020-05-17 23:26:24 +0200
commit9c501221de38e0e4462e9852df8f5a621688de68 (patch)
treec52d2291a3a6f29a90057b2fcd49e96ac8054767 /src/transformations
parent0403980832dbaadad73e51da76ac0e71d37eec85 (diff)
downloadPROJ-9c501221de38e0e4462e9852df8f5a621688de68.tar.gz
PROJ-9c501221de38e0e4462e9852df8f5a621688de68.zip
Address warnings raised by recent cppcheck
Diffstat (limited to 'src/transformations')
-rw-r--r--src/transformations/defmodel.hpp9
-rw-r--r--src/transformations/defmodel_exceptions.hpp6
2 files changed, 12 insertions, 3 deletions
diff --git a/src/transformations/defmodel.hpp b/src/transformations/defmodel.hpp
index 9b28a7d8..642213b7 100644
--- a/src/transformations/defmodel.hpp
+++ b/src/transformations/defmodel.hpp
@@ -475,21 +475,25 @@ struct GridPrototype {
int width = 0;
int height = 0;
+ // cppcheck-suppress functionStatic
bool getLonLatOffset(int /*ix*/, int /*iy*/, double & /*lonOffsetRadian*/,
double & /*latOffsetRadian*/) const {
throw UnimplementedException("getLonLatOffset unimplemented");
}
+ // cppcheck-suppress functionStatic
bool getZOffset(int /*ix*/, int /*iy*/, double & /*zOffset*/) const {
throw UnimplementedException("getZOffset unimplemented");
}
+ // cppcheck-suppress functionStatic
bool getEastingNorthingOffset(int /*ix*/, int /*iy*/,
double & /*eastingOffset*/,
double & /*northingOffset*/) const {
throw UnimplementedException("getEastingNorthingOffset unimplemented");
}
+ // cppcheck-suppress functionStatic
bool getLonLatZOffset(int /*ix*/, int /*iy*/, double & /*lonOffsetRadian*/,
double & /*latOffsetRadian*/,
double & /*zOffset*/) const {
@@ -500,6 +504,7 @@ struct GridPrototype {
#endif
}
+ // cppcheck-suppress functionStatic
bool getEastingNorthingZOffset(int /*ix*/, int /*iy*/,
double & /*eastingOffset*/,
double & /*northingOffset*/,
@@ -526,6 +531,7 @@ struct GridPrototype {
template <class Grid = GridPrototype> struct GridSetPrototype {
// The return pointer should remain "stable" over time for a given grid
// of a GridSet.
+ // cppcheck-suppress functionStatic
const Grid *gridAt(double /*x */, double /* y */) {
throw UnimplementedException("gridAt unimplemented");
}
@@ -542,6 +548,7 @@ struct EvaluatorIfacePrototype {
throw UnimplementedException("open unimplemented");
}
+ // cppcheck-suppress functionStatic
void geographicToGeocentric(double /* lam */, double /* phi */,
double /* height*/, double /* a */,
double /* b */, double /*es*/, double & /* X */,
@@ -549,6 +556,7 @@ struct EvaluatorIfacePrototype {
throw UnimplementedException("geographicToGeocentric unimplemented");
}
+ // cppcheck-suppress functionStatic
void geocentricToGeographic(double /* X */, double /* Y */, double /* Z */,
double /* a */, double /* b */, double /*es*/,
double & /* lam */, double & /* phi */,
@@ -556,6 +564,7 @@ struct EvaluatorIfacePrototype {
throw UnimplementedException("geocentricToGeographic unimplemented");
}
+ // cppcheck-suppress functionStatic
bool isGeographicCRS(const std::string & /* crsDef */) {
throw UnimplementedException("isGeographicCRS unimplemented");
}
diff --git a/src/transformations/defmodel_exceptions.hpp b/src/transformations/defmodel_exceptions.hpp
index 8addf60f..4fc40f6f 100644
--- a/src/transformations/defmodel_exceptions.hpp
+++ b/src/transformations/defmodel_exceptions.hpp
@@ -38,7 +38,7 @@ namespace DEFORMATON_MODEL_NAMESPACE {
/** Parsing exception. */
class ParsingException : public std::exception {
public:
- ParsingException(const std::string &msg) : msg_(msg) {}
+ explicit ParsingException(const std::string &msg) : msg_(msg) {}
const char *what() const noexcept override;
private:
@@ -51,7 +51,7 @@ const char *ParsingException::what() const noexcept { return msg_.c_str(); }
class UnimplementedException : public std::exception {
public:
- UnimplementedException(const std::string &msg) : msg_(msg) {}
+ explicit UnimplementedException(const std::string &msg) : msg_(msg) {}
const char *what() const noexcept override;
private:
@@ -67,7 +67,7 @@ const char *UnimplementedException::what() const noexcept {
/** Evaluator exception. */
class EvaluatorException : public std::exception {
public:
- EvaluatorException(const std::string &msg) : msg_(msg) {}
+ explicit EvaluatorException(const std::string &msg) : msg_(msg) {}
const char *what() const noexcept override;
private: