[Liblas-commits] hg: 2 new changesets
liblas-commits at liblas.org
liblas-commits at liblas.org
Sun Oct 31 17:47:21 EDT 2010
changeset d8c659f0d531 in /Volumes/Data/www/liblas.org/hg
details: http://hg.liblas.orghg?cmd=changeset;node=d8c659f0d531
summary: Trivial clean-up removing superfluous semi-colons and unused variables.
changeset 995afe953a5d in /Volumes/Data/www/liblas.org/hg
details: http://hg.liblas.orghg?cmd=changeset;node=995afe953a5d
summary: Set compilation flags for clang compiler.
diffstat:
CMakeLists.txt | 16 +-
include/liblas/detail/index/indexcell.hpp | 6 +-
include/liblas/iterator.hpp | 5 +-
include/liblas/lasbounds.hpp | 2 +-
include/liblas/lasdimension.hpp | 3 +-
include/liblas/laserror.hpp | 6 +-
include/liblas/lasfilter.hpp | 18 +-
include/liblas/lasheader.hpp | 6 +-
include/liblas/lasindex.hpp | 177 ++++++++++++++---------------
include/liblas/lasschema.hpp | 7 +-
include/liblas/lastransform.hpp | 2 +-
include/liblas/liblas.hpp | 5 +-
12 files changed, 122 insertions(+), 131 deletions(-)
diffs (truncated from 517 to 300 lines):
diff -r a42b5f8eb37f -r 995afe953a5d CMakeLists.txt
--- a/CMakeLists.txt Sat Oct 30 22:43:37 2010 +0100
+++ b/CMakeLists.txt Sun Oct 31 21:47:02 2010 +0000
@@ -101,17 +101,21 @@
endif()
else()
+
+ # Recommended C++ compilation flags
+ # -Weffc++
+ set(LIBLAS_COMMON_CXX_FLAGS
+ "-pedantic -ansi -Wall -Wpointer-arith -Wcast-align -Wcast-qual -Wfloat-equal -Wredundant-decls -Wno-long-long")
+
if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
- # Recommended C++ compilation flags
- # -Weffc++
- set(LIBLAS_GCC_CXX_FLAGS
- "-pedantic -ansi -Wall -Wpointer-arith -Wcast-align -Wcast-qual -Wfloat-equal -Wredundant-decls -Wno-long-long")
-
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC ${LIBLAS_GCC_CXX_FLAGS}")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC ${LIBLAS_COMMON_CXX_FLAGS}")
if (CMAKE_COMPILER_IS_GNUCXX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++98")
endif()
+
+ elseif("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" OR "${CMAKE_CXX_COMPILER}" MATCHES "clang")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${LIBLAS_COMMON_CXX_FLAGS}")
endif()
endif(WIN32)
diff -r a42b5f8eb37f -r 995afe953a5d include/liblas/detail/index/indexcell.hpp
--- a/include/liblas/detail/index/indexcell.hpp Sat Oct 30 22:43:37 2010 +0100
+++ b/include/liblas/detail/index/indexcell.hpp Sun Oct 31 21:47:02 2010 +0000
@@ -78,8 +78,8 @@
boost::uint32_t GetNumPoints(void) const;
boost::uint32_t GetNumSubCellRecords(void) const;
boost::uint32_t GetNumZCellRecords(void) const;
- ElevExtrema GetMinZ(void) const {return m_MinZ;};
- ElevExtrema GetMaxZ(void) const {return m_MaxZ;};
+ ElevExtrema GetMinZ(void) const {return m_MinZ;}
+ ElevExtrema GetMaxZ(void) const {return m_MaxZ;}
bool RoomToAdd(boost::uint32_t a);
void AddPointRecord(boost::uint32_t a);
void AddPointRecord(boost::uint32_t a, boost::uint8_t b);
@@ -99,8 +99,6 @@
const IndexSubCellData::iterator GetEndSubCell(void);
const IndexSubCellData::iterator GetFirstZCellRecord(void);
const IndexSubCellData::iterator GetEndZCell(void);
-
-
};
}} // namespace liblas::detail
diff -r a42b5f8eb37f -r 995afe953a5d include/liblas/iterator.hpp
--- a/include/liblas/iterator.hpp Sat Oct 30 22:43:37 2010 +0100
+++ b/include/liblas/iterator.hpp Sun Oct 31 21:47:02 2010 +0000
@@ -182,8 +182,9 @@
{
assert(0 != m_writer);
- bool const ret = m_writer->WritePoint(value);
- assert(ret); // TODO: Low-level debugging
+ bool ret = false;
+ ret = m_writer->WritePoint(value);
+ assert(ret);
return (*this);
}
diff -r a42b5f8eb37f -r 995afe953a5d include/liblas/lasbounds.hpp
--- a/include/liblas/lasbounds.hpp Sat Oct 30 22:43:37 2010 +0100
+++ b/include/liblas/lasbounds.hpp Sun Oct 31 21:47:02 2010 +0000
@@ -71,7 +71,7 @@
typedef T value_type;
Range(T mmin=std::numeric_limits<T>::max(), T mmax=std::numeric_limits<T>::min())
- : min(mmin), max(mmax) {};
+ : min(mmin), max(mmax) {}
Range(Range const& other)
diff -r a42b5f8eb37f -r 995afe953a5d include/liblas/lasdimension.hpp
--- a/include/liblas/lasdimension.hpp Sat Oct 30 22:43:37 2010 +0100
+++ b/include/liblas/lasdimension.hpp Sun Oct 31 21:47:02 2010 +0000
@@ -59,7 +59,6 @@
#include <boost/multi_index/hashed_index.hpp>
#include <boost/multi_index/sequenced_index.hpp>
-
// std
#include <iosfwd>
#include <limits>
@@ -78,7 +77,7 @@
Dimension& operator=(Dimension const& rhs);
Dimension(Dimension const& other);
- virtual ~Dimension() {};
+ virtual ~Dimension() {}
inline std::string const& GetName() const { return m_name; }
diff -r a42b5f8eb37f -r 995afe953a5d include/liblas/laserror.hpp
--- a/include/liblas/laserror.hpp Sat Oct 30 22:43:37 2010 +0100
+++ b/include/liblas/laserror.hpp Sun Oct 31 21:47:02 2010 +0000
@@ -73,9 +73,9 @@
// TODO - mloskot: What about replacing string return by copy with const char* ?
// char const* GetMethod() const { return m_method.c_str(); }, etc.
- int GetCode() const { return m_code; };
- std::string GetMessage() const { return m_message; };
- std::string GetMethod() const { return m_method; };
+ int GetCode() const { return m_code; }
+ std::string GetMessage() const { return m_message; }
+ std::string GetMethod() const { return m_method; }
private:
diff -r a42b5f8eb37f -r 995afe953a5d include/liblas/lasfilter.hpp
--- a/include/liblas/lasfilter.hpp Sat Oct 30 22:43:37 2010 +0100
+++ b/include/liblas/lasfilter.hpp Sun Oct 31 21:47:02 2010 +0000
@@ -83,7 +83,7 @@
/// Gets the type of filter.
FilterType GetType() const {return m_type; }
- virtual ~FilterI() {};
+ virtual ~FilterI() {}
/// Base constructor. Initializes the FilterType
FilterI(FilterType t) : m_type(t) {}
@@ -225,10 +225,9 @@
/// liblas::ContinuousValueFilter<uint16_t>::filter_func f = &liblas::Point::GetIntensity;
/// liblas::ContinuousValueFilter<uint16_t>* intensity_filter = new liblas::ContinuousValueFilter<uint16_t>(f, 100, c);
/// intensity_filter->SetType(liblas::FilterI::eInclusion);
- ContinuousValueFilter(filter_func f, T value, compare_func c) :
- liblas::FilterI(eInclusion), f(f), c(c),value(value)
- {};
-
+ ContinuousValueFilter(filter_func f, T value, compare_func c)
+ : liblas::FilterI(eInclusion), f(f), c(c),value(value)
+ {}
/// Construct the filter with a filter_func and a simple
@@ -258,8 +257,8 @@
/// liblas::ContinuousValueFilter<uint16_t>* intensity_filter = new liblas::ContinuousValueFilter<uint16_t>(f, intensities);
/// intensity_filter->SetType(liblas::FilterI::eInclusion);
- ContinuousValueFilter(filter_func f, std::string const& filter_string) :
- liblas::FilterI(eInclusion), f(f)
+ ContinuousValueFilter(filter_func f, std::string const& filter_string)
+ : liblas::FilterI(eInclusion), f(f)
{
compare_func compare;
@@ -308,13 +307,10 @@
value = boost::lexical_cast<T>(out);
// std::cout << "Value is: " << value << " pos " << pos << " out " << out << std::endl;
-
-
- };
+ }
bool filter(const liblas::Point& p)
{
-
bool output = false;
T v = f(&p);
diff -r a42b5f8eb37f -r 995afe953a5d include/liblas/lasheader.hpp
--- a/include/liblas/lasheader.hpp Sat Oct 30 22:43:37 2010 +0100
+++ b/include/liblas/lasheader.hpp Sun Oct 31 21:47:02 2010 +0000
@@ -415,13 +415,14 @@
class DefaultHeader
{
public:
- virtual ~DefaultHeader() {};
+ virtual ~DefaultHeader() {}
static Header const& get()
{
static Header object;
return object;
}
+
protected:
DefaultHeader();
DefaultHeader( DefaultHeader const&);
@@ -429,9 +430,6 @@
};
-
-
-
} // namespace liblas
#endif // LIBLAS_LASHEADER_HPP_INCLUDED
diff -r a42b5f8eb37f -r 995afe953a5d include/liblas/lasindex.hpp
--- a/include/liblas/lasindex.hpp Sat Oct 30 22:43:37 2010 +0100
+++ b/include/liblas/lasindex.hpp Sun Oct 31 21:47:02 2010 +0000
@@ -192,9 +192,9 @@
// Creates a Writer from m_ofs and re-saves LAS header with new index, but not with data point records
bool SaveIndexInStandAloneFile(void);
// Calculate index bounds dimensions
- void CalcRangeX(void) {m_rangeX = m_bounds.max(0) - m_bounds.min(0);};
- void CalcRangeY(void) {m_rangeY = m_bounds.max(1) - m_bounds.min(1);};
- void CalcRangeZ(void) {m_rangeZ = m_bounds.max(2) - m_bounds.min(2);};
+ void CalcRangeX(void) {m_rangeX = m_bounds.max(0) - m_bounds.min(0);}
+ void CalcRangeY(void) {m_rangeY = m_bounds.max(1) - m_bounds.min(1);}
+ void CalcRangeZ(void) {m_rangeZ = m_bounds.max(2) - m_bounds.min(2);}
// error messages
bool FileError(const char *Reporter);
@@ -213,8 +213,8 @@
public:
// IndexFailed and IndexReady can be used to tell if an Index is ready for a filter operation
- bool IndexFailed(void) const {return (! m_indexBuilt);};
- bool IndexReady(void) const {return (m_indexBuilt);};
+ bool IndexFailed(void) const {return (! m_indexBuilt);}
+ bool IndexReady(void) const {return (m_indexBuilt);}
// Prep takes the input data and initializes Index values and then either builds or examines the Index
bool Prep(IndexData const& ParamSrc);
// Filter performs a point filter using the bounds in ParamSrc
@@ -225,64 +225,64 @@
IndexIterator* Filter(Bounds<double> const& BoundsSrc, boost::uint32_t ChunkSize);
// Return the bounds of the current Index
- double GetMinX(void) const {return m_bounds.min(0);};
- double GetMaxX(void) const {return m_bounds.max(0);};
- double GetMinY(void) const {return m_bounds.min(1);};
- double GetMaxY(void) const {return m_bounds.max(1);};
- double GetMinZ(void) const {return m_bounds.min(2);};
- double GetMaxZ(void) const {return m_bounds.max(2);};
+ double GetMinX(void) const {return m_bounds.min(0);}
+ double GetMaxX(void) const {return m_bounds.max(0);}
+ double GetMinY(void) const {return m_bounds.min(1);}
+ double GetMaxY(void) const {return m_bounds.max(1);}
+ double GetMinZ(void) const {return m_bounds.min(2);}
+ double GetMaxZ(void) const {return m_bounds.max(2);}
// Ranges are updated when an index is built or the index header VLR read
- double GetRangeX(void) const {return m_rangeX;};
- double GetRangeY(void) const {return m_rangeY;};
- double GetRangeZ(void) const {return m_rangeZ;};
- Bounds<double> const& GetBounds(void) const {return m_bounds;};
+ double GetRangeX(void) const {return m_rangeX;}
+ double GetRangeY(void) const {return m_rangeY;}
+ double GetRangeZ(void) const {return m_rangeZ;}
+ Bounds<double> const& GetBounds(void) const {return m_bounds;}
// Return the number of points used to build the Index
- boost::uint32_t GetPointRecordsCount(void) const {return m_pointRecordsCount;};
+ boost::uint32_t GetPointRecordsCount(void) const {return m_pointRecordsCount;}
// Return the number of cells in the Index
- boost::uint32_t GetCellsX(void) const {return m_cellsX;};
- boost::uint32_t GetCellsY(void) const {return m_cellsY;};
+ boost::uint32_t GetCellsX(void) const {return m_cellsX;}
+ boost::uint32_t GetCellsY(void) const {return m_cellsY;}
// Return the number of Z-dimension cells in the Index. Value is 1 if no Z-cells were created during Index building
- boost::uint32_t GetCellsZ(void) const {return m_cellsZ;};
+ boost::uint32_t GetCellsZ(void) const {return m_cellsZ;}
// 42 is the ID for the Index header VLR and 43 is the normal ID for the Index data VLR's
// For future expansion, multiple indexes could assign data VLR ID's of their own choosing
- boost::uint32_t GetDataVLR_ID(void) const {return m_DataVLR_ID;};
+ boost::uint32_t GetDataVLR_ID(void) const {return m_DataVLR_ID;}
// Since the user can define a Z cell size it is useful to examine that for an existing index
- double GetCellSizeZ(void) const {return m_cellSizeZ;};
+ double GetCellSizeZ(void) const {return m_cellSizeZ;}
// Return values used in building or examining index
- FILE *GetDebugger(void) const {return m_debugger;};
- bool GetReadOnly(void) const {return m_readOnly;};
- bool GetStandaloneIndex(void) const {return m_writestandaloneindex;};
- bool GetForceNewIndex(void) const {return m_forceNewIndex;};
- boost::uint32_t GetMaxMemoryUsage(void) const {return m_maxMemoryUsage;};
- int GetDebugOutputLevel(void) const {return m_debugOutputLevel;};
+ FILE *GetDebugger(void) const {return m_debugger;}
+ bool GetReadOnly(void) const {return m_readOnly;}
+ bool GetStandaloneIndex(void) const {return m_writestandaloneindex;}
+ bool GetForceNewIndex(void) const {return m_forceNewIndex;}
+ boost::uint32_t GetMaxMemoryUsage(void) const {return m_maxMemoryUsage;}
+ int GetDebugOutputLevel(void) const {return m_debugOutputLevel;}
// Not sure if these are more useful than dangerous
- Header *GetPointHeader(void) {return &m_pointheader;};
- Header *GetIndexHeader(void) {return &m_idxheader;};
- Reader *GetReader(void) const {return m_reader;};
- Reader *GetIndexReader(void) const {return m_idxreader;};
- const char *GetTempFileName(void) const {return m_tempFileName.c_str();};
+ Header *GetPointHeader(void) {return &m_pointheader;}
+ Header *GetIndexHeader(void) {return &m_idxheader;}
+ Reader *GetReader(void) const {return m_reader;}
+ Reader *GetIndexReader(void) const {return m_idxreader;}
+ const char *GetTempFileName(void) const {return m_tempFileName.c_str();}
// Returns the strings set in the index when built
const char *GetIndexAuthorStr(void) const;
const char *GetIndexCommentStr(void) const;
const char *GetIndexDateStr(void) const;
- boost::uint8_t GetVersionMajor(void) const {return m_versionMajor;};
- boost::uint8_t GetVersionMinor(void) const {return m_versionMinor;};
+ boost::uint8_t GetVersionMajor(void) const {return m_versionMajor;}
+ boost::uint8_t GetVersionMinor(void) const {return m_versionMinor;}
More information about the Liblas-commits
mailing list