[Liblas-commits] hg: crlf and untabify fixes

liblas-commits at liblas.org liblas-commits at liblas.org
Thu Jan 20 14:03:57 EST 2011


details:   http://hg.liblas.orghg/rev/8b8755be3764
changeset: 2800:8b8755be3764
user:      Michael P. Gerlek <mpg at flaxen.com>
date:      Thu Jan 20 11:03:28 2011 -0800
description:
crlf and untabify fixes

diffstat:

 include/liblas/detail/file_ptr_stream.hpp   |  140 ++++++++++++++--------------
 include/liblas/detail/index/indexoutput.hpp |   44 ++++----
 2 files changed, 92 insertions(+), 92 deletions(-)

diffs (236 lines):

diff -r e5eba3f4447c -r 8b8755be3764 include/liblas/detail/file_ptr_stream.hpp
--- a/include/liblas/detail/file_ptr_stream.hpp	Thu Jan 20 10:56:56 2011 -0800
+++ b/include/liblas/detail/file_ptr_stream.hpp	Thu Jan 20 11:03:28 2011 -0800
@@ -40,74 +40,74 @@
  ****************************************************************************/
 
 #ifndef LIBLAS_DETAIL_FILE_PTR_STREAM_HPP_INCLUDED
-#define LIBLAS_DETAIL_FILE_PTR_STREAM_HPP_INCLUDED
-
-#include <cstdio>
-#include <istream>
-#include <ostream>
-#include <streambuf>
-
-namespace liblas { namespace detail {
-
-class file_ptr_streambuf : public std::streambuf
-{
-public:
-
-    file_ptr_streambuf(FILE* fp) : std::streambuf() , fp(fp) {}
-
-protected:
-
-    virtual int overflow(int c)
-    {
-        return EOF != c ? std::fputc(c, fp) : EOF;
-    }
-
-    virtual int underflow()
-    {
-        int const c = std::getc(fp);
-        if (c != EOF)
-        {
-            std::ungetc(c, fp);
-        }
-        return c;
-    }
-
-    virtual int uflow()
-    {
-        return std::getc(fp);
-    }
-
-    virtual int pbackfail(int c)
-    {
-        return EOF != c ? std::ungetc(c, fp) : EOF;
-    }
-
-    virtual int sync()
-    {
-        return std::fflush(fp);
-    }
-
-private:
-    FILE* fp;
-};
-
-#pragma warning(push)
-#pragma warning(disable: 4355)
-
-class file_ptr_istream : private file_ptr_streambuf, public std::istream
-{
-public:
-    explicit file_ptr_istream(FILE* fp) : file_ptr_streambuf(fp), std::istream(this) {}
-};
-
-class file_ptr_ostream : private file_ptr_streambuf, public std::ostream
-{
-public:
-    explicit file_ptr_ostream(FILE* fp) : file_ptr_streambuf(fp), std::ostream(this) {}
-};
-
-#pragma warning(pop)
-
-}} //namespace liblas::detail
-
+#define LIBLAS_DETAIL_FILE_PTR_STREAM_HPP_INCLUDED
+
+#include <cstdio>
+#include <istream>
+#include <ostream>
+#include <streambuf>
+
+namespace liblas { namespace detail {
+
+class file_ptr_streambuf : public std::streambuf
+{
+public:
+
+    file_ptr_streambuf(FILE* fp) : std::streambuf() , fp(fp) {}
+
+protected:
+
+    virtual int overflow(int c)
+    {
+        return EOF != c ? std::fputc(c, fp) : EOF;
+    }
+
+    virtual int underflow()
+    {
+        int const c = std::getc(fp);
+        if (c != EOF)
+        {
+            std::ungetc(c, fp);
+        }
+        return c;
+    }
+
+    virtual int uflow()
+    {
+        return std::getc(fp);
+    }
+
+    virtual int pbackfail(int c)
+    {
+        return EOF != c ? std::ungetc(c, fp) : EOF;
+    }
+
+    virtual int sync()
+    {
+        return std::fflush(fp);
+    }
+
+private:
+    FILE* fp;
+};
+
+#pragma warning(push)
+#pragma warning(disable: 4355)
+
+class file_ptr_istream : private file_ptr_streambuf, public std::istream
+{
+public:
+    explicit file_ptr_istream(FILE* fp) : file_ptr_streambuf(fp), std::istream(this) {}
+};
+
+class file_ptr_ostream : private file_ptr_streambuf, public std::ostream
+{
+public:
+    explicit file_ptr_ostream(FILE* fp) : file_ptr_streambuf(fp), std::ostream(this) {}
+};
+
+#pragma warning(pop)
+
+}} //namespace liblas::detail
+
 #endif // LIBLAS_DETAIL_FILE_PTR_STREAM_HPP_INCLUDED
\ No newline at end of file
diff -r e5eba3f4447c -r 8b8755be3764 include/liblas/detail/index/indexoutput.hpp
--- a/include/liblas/detail/index/indexoutput.hpp	Thu Jan 20 10:56:56 2011 -0800
+++ b/include/liblas/detail/index/indexoutput.hpp	Thu Jan 20 11:03:28 2011 -0800
@@ -52,22 +52,22 @@
 {
 friend class liblas::Index;
 public:
-	IndexOutput(liblas::Index *indexsource);
+    IndexOutput(liblas::Index *indexsource);
 
 private:
-	liblas::Index *m_index;
-	liblas::VariableRecord m_indexVLRHeaderRecord, m_indexVLRCellRecord;
-	IndexVLRData m_indexVLRHeaderData, m_indexVLRCellPointData, m_indexVLRTempData;
-	boost::uint32_t m_VLRCommonDataSize, m_VLRDataSizeLocation, m_FirstCellLocation, m_LastCellLocation, m_VLRPointCountLocation;
-	boost::uint32_t  m_DataRecordSize, m_TempWritePos, m_DataPointsThisVLR;
-	bool m_FirstCellInVLR, m_SomeDataReadyToWrite;
-	
+    liblas::Index *m_index;
+    liblas::VariableRecord m_indexVLRHeaderRecord, m_indexVLRCellRecord;
+    IndexVLRData m_indexVLRHeaderData, m_indexVLRCellPointData, m_indexVLRTempData;
+    boost::uint32_t m_VLRCommonDataSize, m_VLRDataSizeLocation, m_FirstCellLocation, m_LastCellLocation, m_VLRPointCountLocation;
+    boost::uint32_t  m_DataRecordSize, m_TempWritePos, m_DataPointsThisVLR;
+    bool m_FirstCellInVLR, m_SomeDataReadyToWrite;
+    
 protected:
-	bool InitiateOutput(void);
-	bool OutputCell(liblas::detail::IndexCell *CellBlock, boost::uint32_t CurCellX, boost::uint32_t CurCellY);
-	bool InitializeVLRData(boost::uint32_t CurCellX, boost::uint32_t CurCellY);
-	bool FinalizeOutput(void);
-	
+    bool InitiateOutput(void);
+    bool OutputCell(liblas::detail::IndexCell *CellBlock, boost::uint32_t CurCellX, boost::uint32_t CurCellY);
+    bool InitializeVLRData(boost::uint32_t CurCellX, boost::uint32_t CurCellY);
+    bool FinalizeOutput(void);
+    
 };
 
 template <typename T, typename Q>
@@ -77,8 +77,8 @@
     LIBLAS_SWAP_BYTES_N(src, sizeof(T));
     // error if writing past array end
     if (static_cast<size_t>(pos) + sizeof(T) > dest.size())
-		throw std::out_of_range("liblas::detail::WriteVLRData_n: array index out of range");
-	// copy sizeof(T) bytes to destination
+        throw std::out_of_range("liblas::detail::WriteVLRData_n: array index out of range");
+    // copy sizeof(T) bytes to destination
     memcpy(&dest[pos], &src, sizeof(T));
     // increment the write position to end of written data
     pos += sizeof(T);
@@ -91,19 +91,19 @@
     LIBLAS_SWAP_BYTES_N(src, sizeof(T));
     // error if writing past array end
     if (static_cast<size_t>(pos) + sizeof(T) > dest.size())
-		throw std::out_of_range("liblas::detail::WriteVLRDataNoInc_n: array index out of range");
-	// copy sizeof(T) bytes to destination
+        throw std::out_of_range("liblas::detail::WriteVLRDataNoInc_n: array index out of range");
+    // copy sizeof(T) bytes to destination
     memcpy(&dest[pos], &src, sizeof(T));
 }
 
 template <typename T, typename Q>
 inline void WriteVLRData_str(IndexVLRData& dest, char * const src, T const srclen, Q& pos)
 {
- 	// copy srclen bytes to destination
+    // copy srclen bytes to destination
     std::memcpy(&dest[pos], src, srclen);
     // error if writing past array end
     if (static_cast<size_t>(pos) + static_cast<size_t>(srclen) > dest.size())
-		throw std::out_of_range("liblas::detail::WriteVLRData_str: array index out of range");
+        throw std::out_of_range("liblas::detail::WriteVLRData_str: array index out of range");
     // increment the write position to end of written data
     pos += srclen;
 }
@@ -113,9 +113,9 @@
 {
     // error if writing past array end
     if (static_cast<size_t>(pos) + static_cast<size_t>(srclen) > dest.size())
-		throw std::out_of_range("liblas::detail::WriteVLRDataNoInc_str: array index out of range");
- 	// copy srclen bytes to destination
-	memcpy(&dest[pos], src, srclen);
+        throw std::out_of_range("liblas::detail::WriteVLRDataNoInc_str: array index out of range");
+    // copy srclen bytes to destination
+    memcpy(&dest[pos], src, srclen);
 }
 
 }} // namespace liblas::detail


More information about the Liblas-commits mailing list