[Liblas-commits] laszip: 2 new changesets
liblas-commits at liblas.org
liblas-commits at liblas.org
Mon Dec 20 22:33:55 EST 2010
changeset af0d76303e5d in /Volumes/Data/www/liblas.org/laszip
details: http://hg.liblas.orglaszip?cmd=changeset;node=af0d76303e5d
summary: changing functions to const
changeset 9b06bc82ee1e in /Volumes/Data/www/liblas.org/laszip
details: http://hg.liblas.orglaszip?cmd=changeset;node=9b06bc82ee1e
summary: changing functions to const
diffstat:
include/laszip/lasunzipper.hpp | 2 +-
include/laszip/laszipper.hpp | 2 +-
src/lasreaditem.hpp | 2 +-
src/lasreaditemcompressed_v1.cpp | 16 ++++++++--------
src/lasreaditemcompressed_v1.hpp | 8 ++++----
src/lasreadpoint.cpp | 2 +-
src/lasreadpoint.hpp | 2 +-
src/lasunzipper.cpp | 2 +-
src/laswriteitem.hpp | 4 ++--
src/laswriteitemcompressed_v1.cpp | 16 ++++++++--------
src/laswriteitemcompressed_v1.hpp | 16 ++++++++--------
src/laswriteitemraw.hpp | 8 ++++----
src/laswritepoint.cpp | 2 +-
src/laswritepoint.hpp | 2 +-
src/laszipper.cpp | 2 +-
15 files changed, 43 insertions(+), 43 deletions(-)
diffs (truncated from 404 to 300 lines):
diff -r b49409e2e144 -r 9b06bc82ee1e include/laszip/lasunzipper.hpp
--- a/include/laszip/lasunzipper.hpp Mon Dec 20 10:12:32 2010 -0800
+++ b/include/laszip/lasunzipper.hpp Mon Dec 20 19:33:42 2010 -0800
@@ -67,7 +67,7 @@
bool open(FILE* file, unsigned int num_items, const LASitem* items, unsigned int compression=0);
bool open(istream* stream, unsigned int num_items, const LASitem* items, unsigned int compression=0);
- bool read(unsigned char** point);
+ bool read(unsigned char * const * point);
unsigned int close();
LASunzipper();
diff -r b49409e2e144 -r 9b06bc82ee1e include/laszip/laszipper.hpp
--- a/include/laszip/laszipper.hpp Mon Dec 20 10:12:32 2010 -0800
+++ b/include/laszip/laszipper.hpp Mon Dec 20 19:33:42 2010 -0800
@@ -67,7 +67,7 @@
bool open(FILE* outfile, unsigned int num_items, LASitem* items, unsigned int compression=0);
bool open(ostream* outstream, unsigned int num_items, LASitem* items, unsigned int compression=0);
- bool write(unsigned char** point);
+ bool write(const unsigned char* const * point);
unsigned int close();
LASzipper();
diff -r b49409e2e144 -r 9b06bc82ee1e src/lasreaditem.hpp
--- a/src/lasreaditem.hpp Mon Dec 20 10:12:32 2010 -0800
+++ b/src/lasreaditem.hpp Mon Dec 20 19:33:42 2010 -0800
@@ -79,7 +79,7 @@
class LASreadItemCompressed : public LASreadItem
{
public:
- virtual BOOL init(U8* item)=0;
+ virtual BOOL init(const U8* item)=0;
virtual ~LASreadItemCompressed(){};
};
diff -r b49409e2e144 -r 9b06bc82ee1e src/lasreaditemcompressed_v1.cpp
--- a/src/lasreaditemcompressed_v1.cpp Mon Dec 20 10:12:32 2010 -0800
+++ b/src/lasreaditemcompressed_v1.cpp Mon Dec 20 19:33:42 2010 -0800
@@ -109,7 +109,7 @@
}
-BOOL LASreadItemCompressed_POINT10_v1::init(U8* item)
+BOOL LASreadItemCompressed_POINT10_v1::init(const U8* item)
{
/* init state */
last_dir = 0;
@@ -135,7 +135,7 @@
return TRUE;
}
-BOOL LASreadItemCompressed_POINT10_v1::read(U8* item)
+inline BOOL LASreadItemCompressed_POINT10_v1::read(U8* item)
{
// find median difference for x and y from 3 preceding differences
I32 median_x;
@@ -276,7 +276,7 @@
delete ic_gpstime;
}
-BOOL LASreadItemCompressed_GPSTIME_v1::init(U8* item)
+BOOL LASreadItemCompressed_GPSTIME_v1::init(const U8* item)
{
/* init state */
last_gpstime_diff = 0;
@@ -292,7 +292,7 @@
return TRUE;
}
-BOOL LASreadItemCompressed_GPSTIME_v1::read(U8* item)
+inline BOOL LASreadItemCompressed_GPSTIME_v1::read(U8* item)
{
I32 multi;
if (last_gpstime_diff == 0) // if the last integer difference was zero
@@ -390,7 +390,7 @@
delete [] last_item;
}
-BOOL LASreadItemCompressed_RGB_v1::init(U8* item)
+BOOL LASreadItemCompressed_RGB_v1::init(const U8* item)
{
/* init state */
@@ -403,7 +403,7 @@
return TRUE;
}
-BOOL LASreadItemCompressed_RGB_v1::read(U8* item)
+inline BOOL LASreadItemCompressed_RGB_v1::read(U8* item)
{
U32 i, sym = dec->decodeSymbol(m_byte_used);
for (i = 0; i < 6; i++)
@@ -444,7 +444,7 @@
delete [] last_item;
}
-BOOL LASreadItemCompressed_BYTE_v1::init(U8* item)
+BOOL LASreadItemCompressed_BYTE_v1::init(const U8* item)
{
/* init state */
@@ -456,7 +456,7 @@
return TRUE;
}
-BOOL LASreadItemCompressed_BYTE_v1::read(U8* item)
+inline BOOL LASreadItemCompressed_BYTE_v1::read(U8* item)
{
U32 i;
for (i = 0; i < number; i++)
diff -r b49409e2e144 -r 9b06bc82ee1e src/lasreaditemcompressed_v1.hpp
--- a/src/lasreaditemcompressed_v1.hpp Mon Dec 20 10:12:32 2010 -0800
+++ b/src/lasreaditemcompressed_v1.hpp Mon Dec 20 19:33:42 2010 -0800
@@ -56,7 +56,7 @@
LASreadItemCompressed_POINT10_v1(EntropyDecoder* dec);
- BOOL init(U8* item);
+ BOOL init(const U8* item);
BOOL read(U8* item);
~LASreadItemCompressed_POINT10_v1();
@@ -87,7 +87,7 @@
LASreadItemCompressed_GPSTIME_v1(EntropyDecoder* dec);
- BOOL init(U8* item);
+ BOOL init(const U8* item);
BOOL read(U8* item);
~LASreadItemCompressed_GPSTIME_v1();
@@ -109,7 +109,7 @@
LASreadItemCompressed_RGB_v1(EntropyDecoder* dec);
- BOOL init(U8* item);
+ BOOL init(const U8* item);
BOOL read(U8* item);
~LASreadItemCompressed_RGB_v1();
@@ -128,7 +128,7 @@
LASreadItemCompressed_BYTE_v1(EntropyDecoder* dec, U32 number);
- BOOL init(U8* item);
+ BOOL init(const U8* item);
BOOL read(U8* item);
~LASreadItemCompressed_BYTE_v1();
diff -r b49409e2e144 -r 9b06bc82ee1e src/lasreadpoint.cpp
--- a/src/lasreadpoint.cpp Mon Dec 20 10:12:32 2010 -0800
+++ b/src/lasreadpoint.cpp Mon Dec 20 19:33:42 2010 -0800
@@ -185,7 +185,7 @@
return TRUE;
}
-BOOL LASreadPoint::read(U8** point)
+BOOL LASreadPoint::read(U8* const * point)
{
U32 i;
if (readers)
diff -r b49409e2e144 -r 9b06bc82ee1e src/lasreadpoint.hpp
--- a/src/lasreadpoint.hpp Mon Dec 20 10:12:32 2010 -0800
+++ b/src/lasreadpoint.hpp Mon Dec 20 19:33:42 2010 -0800
@@ -66,7 +66,7 @@
BOOL setup(U32 num_items, const LASitem* items, U32 compression=0);
BOOL init(ByteStreamIn* instream);
- BOOL read(U8** point);
+ BOOL read(U8* const * point);
BOOL done() {return TRUE;};
private:
diff -r b49409e2e144 -r 9b06bc82ee1e src/lasunzipper.cpp
--- a/src/lasunzipper.cpp Mon Dec 20 10:12:32 2010 -0800
+++ b/src/lasunzipper.cpp Mon Dec 20 19:33:42 2010 -0800
@@ -73,7 +73,7 @@
return true;
}
-bool LASunzipper::read(unsigned char** point)
+bool LASunzipper::read(unsigned char * const * point)
{
count++;
return reader->read(point);
diff -r b49409e2e144 -r 9b06bc82ee1e src/laswriteitem.hpp
--- a/src/laswriteitem.hpp Mon Dec 20 10:12:32 2010 -0800
+++ b/src/laswriteitem.hpp Mon Dec 20 19:33:42 2010 -0800
@@ -53,7 +53,7 @@
class LASwriteItem
{
public:
- virtual BOOL write(U8* item)=0;
+ virtual BOOL write(const U8* item)=0;
virtual ~LASwriteItem(){};
};
@@ -79,7 +79,7 @@
class LASwriteItemCompressed : public LASwriteItem
{
public:
- virtual BOOL init(U8* item)=0;
+ virtual BOOL init(const U8* item)=0;
virtual ~LASwriteItemCompressed(){};
};
diff -r b49409e2e144 -r 9b06bc82ee1e src/laswriteitemcompressed_v1.cpp
--- a/src/laswriteitemcompressed_v1.cpp Mon Dec 20 10:12:32 2010 -0800
+++ b/src/laswriteitemcompressed_v1.cpp Mon Dec 20 19:33:42 2010 -0800
@@ -108,7 +108,7 @@
delete [] last_item;
}
-BOOL LASwriteItemCompressed_POINT10_v1::init(U8* item)
+BOOL LASwriteItemCompressed_POINT10_v1::init(const U8* item)
{
/* init state */
last_dir = 0;
@@ -134,7 +134,7 @@
return TRUE;
}
-BOOL LASwriteItemCompressed_POINT10_v1::write(U8* item)
+inline BOOL LASwriteItemCompressed_POINT10_v1::write(const U8* item)
{
// find median difference for x and y from 3 preceding differences
I32 median_x;
@@ -277,7 +277,7 @@
delete ic_gpstime;
}
-BOOL LASwriteItemCompressed_GPSTIME_v1::init(U8* item)
+BOOL LASwriteItemCompressed_GPSTIME_v1::init(const U8* item)
{
/* init state */
last_gpstime_diff = 0;
@@ -293,7 +293,7 @@
return TRUE;
}
-BOOL LASwriteItemCompressed_GPSTIME_v1::write(U8* item)
+inline BOOL LASwriteItemCompressed_GPSTIME_v1::write(const U8* item)
{
I64F64 this_gpstime;
this_gpstime.f64 = *((F64*)item);
@@ -433,7 +433,7 @@
delete [] last_item;
}
-BOOL LASwriteItemCompressed_RGB_v1::init(U8* item)
+BOOL LASwriteItemCompressed_RGB_v1::init(const U8* item)
{
/* init state */
@@ -446,7 +446,7 @@
return TRUE;
}
-BOOL LASwriteItemCompressed_RGB_v1::write(U8* item)
+inline BOOL LASwriteItemCompressed_RGB_v1::write(const U8* item)
{
U32 i, sym = 0;
for (i = 0; i < 6; i++)
@@ -492,7 +492,7 @@
delete [] last_item;
}
-BOOL LASwriteItemCompressed_BYTE_v1::init(U8* item)
+BOOL LASwriteItemCompressed_BYTE_v1::init(const U8* item)
{
/* init state */
@@ -504,7 +504,7 @@
return TRUE;
}
-BOOL LASwriteItemCompressed_BYTE_v1::write(U8* item)
+inline BOOL LASwriteItemCompressed_BYTE_v1::write(const U8* item)
{
U32 i;
for (i = 0; i < number; i++)
diff -r b49409e2e144 -r 9b06bc82ee1e src/laswriteitemcompressed_v1.hpp
--- a/src/laswriteitemcompressed_v1.hpp Mon Dec 20 10:12:32 2010 -0800
+++ b/src/laswriteitemcompressed_v1.hpp Mon Dec 20 19:33:42 2010 -0800
@@ -56,8 +56,8 @@
LASwriteItemCompressed_POINT10_v1(EntropyEncoder* enc);
- BOOL init(U8* item);
- BOOL write(U8* item);
+ BOOL init(const U8* item);
+ BOOL write(const U8* item);
~LASwriteItemCompressed_POINT10_v1();
@@ -87,8 +87,8 @@
LASwriteItemCompressed_GPSTIME_v1(EntropyEncoder* enc);
More information about the Liblas-commits
mailing list