[Liblas-commits] hg: 4 new changesets

liblas-commits at liblas.org liblas-commits at liblas.org
Tue Mar 23 23:12:06 EDT 2010


changeset 971f707cd156 in /Volumes/Data/www/liblas.org/hg
details: http://hg.liblas.orghg?cmd=changeset;node=971f707cd156
summary: cache reference to PointFormat

changeset 574098e37379 in /Volumes/Data/www/liblas.org/hg
details: http://hg.liblas.orghg?cmd=changeset;node=574098e37379
summary: whitespace normalization

changeset d7a3fc6e99bc in /Volumes/Data/www/liblas.org/hg
details: http://hg.liblas.orghg?cmd=changeset;node=d7a3fc6e99bc
summary: ignore more stuff

changeset 0b95a35c7f8f in /Volumes/Data/www/liblas.org/hg
details: http://hg.liblas.orghg?cmd=changeset;node=0b95a35c7f8f
summary: copy README to README.txt to satisfy CPack

diffstat:

 .hgignore                              |   3 +++
 CMakeLists.txt                         |   3 +++
 cmake/modules/BuildOSGeo4W.cmake       |  24 ------------------------
 include/liblas/detail/reader/point.hpp |   2 --
 src/detail/reader/point.cpp            |  14 ++++++++------
 5 files changed, 14 insertions(+), 32 deletions(-)

diffs (126 lines):

diff -r e8ee49101fc0 -r 0b95a35c7f8f .hgignore
--- a/.hgignore	Mon Mar 22 13:22:25 2010 -0500
+++ b/.hgignore	Tue Mar 23 22:06:24 2010 -0500
@@ -72,3 +72,6 @@
 test/data/*.dat
 test/data/*.idx
 .dirstamp
+CMakeScripts
+libLAS.xcodeproj
+build/libLAS.build
diff -r e8ee49101fc0 -r 0b95a35c7f8f CMakeLists.txt
--- a/CMakeLists.txt	Mon Mar 22 13:22:25 2010 -0500
+++ b/CMakeLists.txt	Tue Mar 23 22:06:24 2010 -0500
@@ -70,6 +70,9 @@
 # Output directory in which to build ARCHIVE target files.
 set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${LIBLAS_BUILD_OUTPUT_DIRECTORY}) 
 
+file(READ "README" README )
+file(WRITE "README.txt" "${README}")
+
 ###############################################################################
 # Platform and compiler specific settings
 
diff -r e8ee49101fc0 -r 0b95a35c7f8f cmake/modules/BuildOSGeo4W.cmake
--- a/cmake/modules/BuildOSGeo4W.cmake	Mon Mar 22 13:22:25 2010 -0500
+++ b/cmake/modules/BuildOSGeo4W.cmake	Tue Mar 23 22:06:24 2010 -0500
@@ -4,28 +4,4 @@
 #
 ###############################################################################
 
-if(WIN32)
-    set(DEFAULT_LIB_SUBDIR lib)
-    set(DEFAULT_DATA_SUBDIR .)
-    set(DEFAULT_INCLUDE_SUBDIR include)
 
-    if (MSVC)
-        set(DEFAULT_BIN_SUBDIR bin)
-    else()
-        set(DEFAULT_BIN_SUBDIR .)
-    endif()
-else()
-    # Common locatoins for Unix and Mac OS X
-    set(DEFAULT_BIN_SUBDIR bin)
-    set(DEFAULT_LIB_SUBDIR lib)
-    set(DEFAULT_DATA_SUBDIR share/liblas)
-    set(DEFAULT_INCLUDE_SUBDIR include)
-endif()
-
- ADD_CUSTOM_COMMAND(
-   OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/README.txt
-   COMMAND ${CMAKE_COMMAND} xcopy /y /r/d /f ${CMAKE_CURRENT_SOURCE_DIR}/README ${CMAKE_CURRENT_SOURCE_DIR}/README.txt
-   DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/README
-   )
-
-ADD_CUSTOM_TARGET(generate_readme DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/README.txt)
\ No newline at end of file
diff -r e8ee49101fc0 -r 0b95a35c7f8f include/liblas/detail/reader/point.hpp
--- a/include/liblas/detail/reader/point.hpp	Mon Mar 22 13:22:25 2010 -0500
+++ b/include/liblas/detail/reader/point.hpp	Tue Mar 23 22:06:24 2010 -0500
@@ -87,8 +87,6 @@
     Point(Point const& other);
     Point& operator=(Point const& rhs);
     
-    
-
     std::istream& m_ifs;
     const liblas::Header& m_header;
     liblas::Point m_point;
diff -r e8ee49101fc0 -r 0b95a35c7f8f src/detail/reader/point.cpp
--- a/src/detail/reader/point.cpp	Mon Mar 22 13:22:25 2010 -0500
+++ b/src/detail/reader/point.cpp	Tue Mar 23 22:06:24 2010 -0500
@@ -92,6 +92,8 @@
     // TODO: Replace with compile-time assert
     assert(liblas::ePointSize0 == sizeof(record));
 
+    const PointFormat& format = m_header.GetPointFormat();
+    
     try
     {
         detail::read_n(record, m_ifs, sizeof(PointRecord));
@@ -106,14 +108,14 @@
     // Reader::FillPoint(record, m_point, m_header);
     m_point.SetCoordinates(m_header, m_point.GetX(), m_point.GetY(), m_point.GetZ());
 
-    if (m_header.GetPointFormat().HasTime()) 
+    if (format.HasTime()) 
     {
 
         detail::read_n(gpst, m_ifs, sizeof(double));
         m_point.SetTime(gpst);
         bytesread += sizeof(double);
         
-        if (m_header.GetPointFormat().HasColor()) 
+        if (format.HasColor()) 
         {
             detail::read_n(red, m_ifs, sizeof(uint16_t));
             detail::read_n(green, m_ifs, sizeof(uint16_t));
@@ -125,7 +127,7 @@
             bytesread += 3 * sizeof(uint16_t);
         }
     } else {
-        if (m_header.GetPointFormat().HasColor()) 
+        if (format.HasColor()) 
         {
             detail::read_n(red, m_ifs, sizeof(uint16_t));
             detail::read_n(green, m_ifs, sizeof(uint16_t));
@@ -138,16 +140,16 @@
         }        
     }
     
-    if (bytesread != m_header.GetPointFormat().GetByteSize()) {
+    if (bytesread != format.GetByteSize()) {
         std::ostringstream msg; 
         msg <<  "The number of bytes that were read ("<< bytesread <<") does not " 
                 "match the number of bytes the point's format "
                 "says it should have (" << 
-                m_header.GetPointFormat().GetByteSize() << ")";
+                format.GetByteSize() << ")";
         throw std::runtime_error(msg.str());
         
     }
-    if (m_header.GetPointFormat().GetByteSize() != m_header.GetDataRecordLength())
+    if (format.GetByteSize() != m_header.GetDataRecordLength())
     {
         std::size_t bytesleft = m_header.GetDataRecordLength() - bytesread;
 


More information about the Liblas-commits mailing list