From 02e0b2ef8c539bb8c998934c863a2f66d6b57262 Mon Sep 17 00:00:00 2001 From: cguo51 Date: Sat, 30 Mar 2024 17:15:22 -0700 Subject: [PATCH] change the type of start and end from int to size_t --- include/geos/geom/Envelope3d.h | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/include/geos/geom/Envelope3d.h b/include/geos/geom/Envelope3d.h index 88d2199a..239b5135 100644 --- a/include/geos/geom/Envelope3d.h +++ b/include/geos/geom/Envelope3d.h @@ -74,8 +74,8 @@ class GEOS_DLL Envelope3d { , maxy(DoubleNotANumber) , minz(DoubleNotANumber) , maxz(DoubleNotANumber) - , start_(-1) - , end_(-1) + , start_(0) + , end_(0) {}; /** \brief @@ -88,7 +88,7 @@ class GEOS_DLL Envelope3d { * @param z1 the first y-value * @param z2 the second y-value */ - Envelope3d(double x1, double x2, double y1, double y2, double z1, double z2, int start = -1, int end = -1, std::string bloom_filter = "") + Envelope3d(double x1, double x2, double y1, double y2, double z1, double z2, size_t start = 0, size_t end = 0, std::string bloom_filter = "") { init(x1, x2, y1, y2, z1, z2, start, end, std::move(bloom_filter)); } @@ -208,7 +208,7 @@ class GEOS_DLL Envelope3d { * @param z1 the first y-value * @param z2 the second y-value */ - void init(double x1, double x2, double y1, double y2, double z1, double z2, int start = -1, int end = -1, std::string bloom_filter = "") + void init(double x1, double x2, double y1, double y2, double z1, double z2, size_t start = -1, size_t end = -1, std::string bloom_filter = "") { if(x1 < x2) { minx = x1; @@ -268,8 +268,8 @@ class GEOS_DLL Envelope3d { void setToNull() { minx = maxx = miny = maxy = minz = maxz = DoubleNotANumber; - start_ = -1; - end_ = -1; + start_ = 0; + end_ = 0; bloom_filter_ = ""; }; @@ -283,7 +283,7 @@ class GEOS_DLL Envelope3d { { return std::isnan(maxx) && std::isnan(maxy) && std::isnan(maxz) && std::isnan(minx) && std::isnan(miny) && std::isnan(minz) && - start_ == -1 && end_ == -1 && bloom_filter_.empty(); + start_ == 0 && end_ == 0 && bloom_filter_.empty(); }; /** \brief @@ -971,25 +971,25 @@ class GEOS_DLL Envelope3d { operator< (const Envelope3d& a, const Envelope3d& b); // get the start_ - int getStart() const + size_t getStart() const { return start_; } // set the start_ - void setStart(int start) + void setStart(size_t start) { start_ = start; } // get the end_ - int getEnd() const + size_t getEnd() const { return end_; } // set the end_ - void setEnd(int end) + void setEnd(size_t end) { end_ = end; } @@ -1057,10 +1057,10 @@ class GEOS_DLL Envelope3d { double maxz; /// the start - int start_; + size_t start_; /// the end - int end_; + size_t end_; /// bloom filter std::string bloom_filter_;