[Liblas-commits] hg: use proper size_type for dimension in
liblas::Bounds
liblas-commits at liblas.org
liblas-commits at liblas.org
Tue Aug 3 12:23:23 EDT 2010
changeset 948a7443de1e in /Volumes/Data/www/liblas.org/hg
details: http://hg.liblas.orghg?cmd=changeset;node=948a7443de1e
summary: use proper size_type for dimension in liblas::Bounds
diffstat:
include/liblas/lasbounds.hpp | 7 ++++---
src/lasbounds.cpp | 6 +++---
2 files changed, 7 insertions(+), 6 deletions(-)
diffs (51 lines):
diff -r bedacdc8457f -r 948a7443de1e include/liblas/lasbounds.hpp
--- a/include/liblas/lasbounds.hpp Tue Aug 03 11:17:12 2010 -0500
+++ b/include/liblas/lasbounds.hpp Tue Aug 03 11:23:17 2010 -0500
@@ -53,7 +53,8 @@
public:
typedef std::vector<double> Vector;
-
+ typedef std::vector<double>::size_type size_type;
+
Bounds();
Bounds(double minx, double miny, double maxx, double maxy, double minz, double maxz);
Bounds(double minx, double miny, double maxx, double maxy);
@@ -69,8 +70,8 @@
bool equal(Bounds const& other) const;
bool intersects(Bounds const& other) const;
- uint32_t dimension() const;
- void dimension(uint32_t d);
+ size_type dimension() const;
+ void dimension(size_type d);
private:
Vector mins;
diff -r bedacdc8457f -r 948a7443de1e src/lasbounds.cpp
--- a/src/lasbounds.cpp Tue Aug 03 11:17:12 2010 -0500
+++ b/src/lasbounds.cpp Tue Aug 03 11:23:17 2010 -0500
@@ -191,12 +191,12 @@
return *this;
}
-uint32_t Bounds::dimension() const
+Bounds::size_type Bounds::dimension() const
{
return mins.size();
}
-void Bounds::dimension(uint32_t d)
+void Bounds::dimension(Bounds::size_type d)
{
if (maxs.size() < d) {
maxs.resize(d);
@@ -208,7 +208,7 @@
void Bounds::verify()
{
- for (uint32_t d = 0; d < dimension(); ++d)
+ for (size_type d = 0; d < dimension(); ++d)
{
if (min(d) > max(d) )
{
More information about the Liblas-commits
mailing list