aboutsummaryrefslogtreecommitdiff
path: root/src/iso19111/c_api.cpp
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2020-10-25 19:18:06 +0100
committerEven Rouault <even.rouault@spatialys.com>2020-10-25 19:18:06 +0100
commit6476108774c8c947f0197ec1acff781f17e6edde (patch)
treec6115998e4da123021825e6938c283fd17c90ceb /src/iso19111/c_api.cpp
parent9f2500e74e6141469b1ca3134346ac12e7d7dbb4 (diff)
downloadPROJ-6476108774c8c947f0197ec1acff781f17e6edde.tar.gz
PROJ-6476108774c8c947f0197ec1acff781f17e6edde.zip
Fix issues spotted by cppcheck
Diffstat (limited to 'src/iso19111/c_api.cpp')
-rw-r--r--src/iso19111/c_api.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/iso19111/c_api.cpp b/src/iso19111/c_api.cpp
index 8d77437a..7582f37f 100644
--- a/src/iso19111/c_api.cpp
+++ b/src/iso19111/c_api.cpp
@@ -1032,7 +1032,7 @@ PJ_OBJ_LIST *proj_create_from_name(PJ_CONTEXT *ctx, const char *auth_name,
size_t limitResultCount,
const char *const *options) {
SANITIZE_CTX(ctx);
- if (!searchedName || (types != nullptr && typesCount <= 0) ||
+ if (!searchedName || (types != nullptr && typesCount == 0) ||
(types == nullptr && typesCount > 0)) {
proj_log_error(ctx, __FUNCTION__, "invalid input");
return nullptr;
@@ -7871,6 +7871,7 @@ proj_create_operations(PJ_CONTEXT *ctx, const PJ *source_crs,
* @since 7.1
*/
int proj_get_suggested_operation(PJ_CONTEXT *ctx, PJ_OBJ_LIST *operations,
+ // cppcheck-suppress passedByValue
PJ_DIRECTION direction, PJ_COORD coord) {
SANITIZE_CTX(ctx);
auto opList = dynamic_cast<PJ_OPERATION_LIST *>(operations);