diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2021-04-23 12:39:35 +0200 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2021-04-23 12:39:35 +0200 |
| commit | 399cba57262f73f205f0ea6832acd383741d120f (patch) | |
| tree | 89c29478c6657bc1bb351a9e6bde2344cdb6881f /src/iso19111/factory.cpp | |
| parent | a275d4591275c1a273c1c7b27565b808b253c6b9 (diff) | |
| download | PROJ-399cba57262f73f205f0ea6832acd383741d120f.tar.gz PROJ-399cba57262f73f205f0ea6832acd383741d120f.zip | |
getInsertStatementsFor(): replace while with if (master only, CID 320133)
Diffstat (limited to 'src/iso19111/factory.cpp')
| -rw-r--r-- | src/iso19111/factory.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/iso19111/factory.cpp b/src/iso19111/factory.cpp index 7b83484d..fabf57e1 100644 --- a/src/iso19111/factory.cpp +++ b/src/iso19111/factory.cpp @@ -2456,7 +2456,8 @@ std::vector<std::string> DatabaseContext::Private::getInsertStatementsFor( for (const auto &candidate : candidates) { if (candidate.second == 100) { const auto &ids = candidate.first->identifiers(); - for (const auto &id : ids) { + if (!ids.empty()) { + const auto &id = ids.front(); compAuthName = *(id->codeSpace()); compCode = id->code(); break; |
