[geos-commits] [SCM] GEOS branch main updated. 511bb3f2cf2d2f8bcf581cd101f350047aa97a35
git at osgeo.org
git at osgeo.org
Mon Aug 16 08:39:17 PDT 2021
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GEOS".
The branch, main has been updated
via 511bb3f2cf2d2f8bcf581cd101f350047aa97a35 (commit)
via 12f825bc3d36940e4ba7b6e3c6376a3824ff6590 (commit)
from 16610691611decd2b9545ea68ef41e8b94f859e6 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 511bb3f2cf2d2f8bcf581cd101f350047aa97a35
Merge: 1661069 12f825b
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date: Mon Aug 16 08:39:10 2021 -0700
Merge branch 'rouault-cppcheck_fix' into main
commit 12f825bc3d36940e4ba7b6e3c6376a3824ff6590
Author: Even Rouault <even.rouault at spatialys.com>
Date: Fri Aug 13 23:14:02 2021 +0200
Remove always true check
numRings is unsigned, and we have tested just above if it was 0 and
returned if it was. Consequently at that point, it is > 0
Spotted by cppcheck
diff --git a/src/io/WKBReader.cpp b/src/io/WKBReader.cpp
index 8bcb8b2..d75a161 100644
--- a/src/io/WKBReader.cpp
+++ b/src/io/WKBReader.cpp
@@ -383,10 +383,7 @@ WKBReader::readPolygon()
return factory.createPolygon(hasZ ? 3 : 2);
}
- std::unique_ptr<LinearRing> shell;
- if(numRings > 0) {
- shell = readLinearRing();
- }
+ std::unique_ptr<LinearRing> shell(readLinearRing());
if(numRings > 1) {
std::vector<std::unique_ptr<LinearRing>> holes(numRings - 1);
-----------------------------------------------------------------------
Summary of changes:
src/io/WKBReader.cpp | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
hooks/post-receive
--
GEOS
More information about the geos-commits
mailing list