[Liblas-commits] hg: rename GetSize to GetBitSize to eliminate any
confusion for ...
liblas-commits at liblas.org
liblas-commits at liblas.org
Thu Sep 9 16:17:05 EDT 2010
changeset c8da6dbbfde7 in /Volumes/Data/www/liblas.org/hg
details: http://hg.liblas.orghg?cmd=changeset;node=c8da6dbbfde7
summary: rename GetSize to GetBitSize to eliminate any confusion for both liblas::Dimension and liblas::Schema
diffstat:
include/liblas/lasschema.hpp | 4 ++--
src/lasschema.cpp | 11 ++++++-----
2 files changed, 8 insertions(+), 7 deletions(-)
diffs (69 lines):
diff -r cc8916dc511c -r c8da6dbbfde7 include/liblas/lasschema.hpp
--- a/include/liblas/lasschema.hpp Thu Sep 09 10:57:18 2010 -0500
+++ b/include/liblas/lasschema.hpp Thu Sep 09 15:16:44 2010 -0500
@@ -78,7 +78,7 @@
/// Fetch byte size
boost::uint32_t GetByteSize() const;
- boost::uint32_t GetSize() const;
+ boost::uint32_t GetBitSize() const;
/// Get the base size (only accounting for Time, Color, etc )
boost::uint32_t GetBaseByteSize() const;
@@ -143,7 +143,7 @@
std::string const& GetName() { return m_name; }
/// bits, logical size of point record
- std::size_t GetSize() const
+ std::size_t GetBitSize() const
{
return m_bitsize;
}
diff -r cc8916dc511c -r c8da6dbbfde7 src/lasschema.cpp
--- a/src/lasschema.cpp Thu Sep 09 10:57:18 2010 -0500
+++ b/src/lasschema.cpp Thu Sep 09 15:16:44 2010 -0500
@@ -445,7 +445,7 @@
dim.put("description", t->GetDescription());
dim.put("position", t->GetPosition());
dim.put("active", static_cast<boost::uint32_t>(t->IsActive()));
- dim.put("size", t->GetSize());
+ dim.put("size", t->GetBitSize());
dim.put("integer", static_cast<boost::uint32_t>(t->IsInteger()));
dim.put("signed", static_cast<boost::uint32_t>(t->IsSigned()));
dim.put("required", static_cast<boost::uint32_t>(t->IsRequired()));
@@ -575,14 +575,15 @@
}
return false;
}
-boost::uint32_t Schema::GetSize() const
+
+boost::uint32_t Schema::GetBitSize() const
{
std::vector<DimensionPtr>::const_iterator i;
boost::uint32_t size=0;
for (i = m_dimensions.begin(); i != m_dimensions.end(); ++i)
{
- size += (*i)->GetSize();
+ size += (*i)->GetBitSize();
}
if (size % 8 != 0) {
@@ -620,7 +621,7 @@
boost::uint32_t Schema::GetByteSize() const
{
- return GetSize() / 8;
+ return GetBitSize() / 8;
}
boost::uint32_t Schema::GetBaseByteSize() const
@@ -633,7 +634,7 @@
{
boost::shared_ptr<Dimension> t = *i;
if ( t->IsRequired() == true)
- size += t->GetSize();
+ size += t->GetBitSize();
}
More information about the Liblas-commits
mailing list