[Liblas-commits] laszip: init functions return BOOL instead of I32
liblas-commits at liblas.org
liblas-commits at liblas.org
Mon Jan 31 11:51:07 EST 2011
details: http://hg.liblas.orglaszip/rev/bdef75161817
changeset: 165:bdef75161817
user: isenburg
date: Mon Jan 31 08:50:56 2011 -0800
description:
init functions return BOOL instead of I32
diffstat:
src/arithmeticdecoder.cpp | 8 ++++----
src/arithmeticdecoder.hpp | 2 +-
src/arithmeticencoder.cpp | 6 +++---
src/arithmeticencoder.hpp | 2 +-
src/entropydecoder.hpp | 2 +-
src/entropyencoder.hpp | 2 +-
6 files changed, 11 insertions(+), 11 deletions(-)
diffs (102 lines):
diff -r 2d5c4b256a46 -r bdef75161817 src/arithmeticdecoder.cpp
--- a/src/arithmeticdecoder.cpp Sun Jan 30 05:40:05 2011 -0800
+++ b/src/arithmeticdecoder.cpp Mon Jan 31 08:50:56 2011 -0800
@@ -70,7 +70,7 @@
#include "arithmeticdecoder.hpp"
#include <string.h>
-#include <assert.h>
+#include <assert.h>
#include "arithmeticmodel.hpp"
@@ -79,16 +79,16 @@
instream = 0;
}
-I32 ArithmeticDecoder::init(ByteStreamIn* instream)
+BOOL ArithmeticDecoder::init(ByteStreamIn* instream)
{
- assert(instream);
+ if (instream == 0) return FALSE;
this->instream = instream;
length = AC__MaxLength;
value = (instream->getByte() << 24);
value |= (instream->getByte() << 16);
value |= (instream->getByte() << 8);
value |= (instream->getByte());
- return 0;
+ return TRUE;
}
void ArithmeticDecoder::done()
diff -r 2d5c4b256a46 -r bdef75161817 src/arithmeticdecoder.hpp
--- a/src/arithmeticdecoder.hpp Sun Jan 30 05:40:05 2011 -0800
+++ b/src/arithmeticdecoder.hpp Mon Jan 31 08:50:56 2011 -0800
@@ -45,7 +45,7 @@
~ArithmeticDecoder();
/* Manage decoding */
- I32 init(ByteStreamIn* instream);
+ BOOL init(ByteStreamIn* instream);
void done();
/* Manage an entropy model for a single bit */
diff -r 2d5c4b256a46 -r bdef75161817 src/arithmeticencoder.cpp
--- a/src/arithmeticencoder.cpp Sun Jan 30 05:40:05 2011 -0800
+++ b/src/arithmeticencoder.cpp Mon Jan 31 08:50:56 2011 -0800
@@ -87,15 +87,15 @@
free(outbuffer);
}
-I32 ArithmeticEncoder::init(ByteStreamOut* outstream)
+BOOL ArithmeticEncoder::init(ByteStreamOut* outstream)
{
- assert(outstream);
+ if (outstream == 0) return FALSE;
this->outstream = outstream;
base = 0;
length = AC__MaxLength;
outbyte = outbuffer;
endbyte = endbuffer;
- return 0;
+ return TRUE;
}
void ArithmeticEncoder::done()
diff -r 2d5c4b256a46 -r bdef75161817 src/arithmeticencoder.hpp
--- a/src/arithmeticencoder.hpp Sun Jan 30 05:40:05 2011 -0800
+++ b/src/arithmeticencoder.hpp Mon Jan 31 08:50:56 2011 -0800
@@ -45,7 +45,7 @@
~ArithmeticEncoder();
/* Manage encoding */
- I32 init(ByteStreamOut* outstream);
+ BOOL init(ByteStreamOut* outstream);
void done();
/* Manage an entropy model for a single bit */
diff -r 2d5c4b256a46 -r bdef75161817 src/entropydecoder.hpp
--- a/src/entropydecoder.hpp Sun Jan 30 05:40:05 2011 -0800
+++ b/src/entropydecoder.hpp Mon Jan 31 08:50:56 2011 -0800
@@ -43,7 +43,7 @@
virtual ~EntropyDecoder() {};
/* Manage decoding */
- virtual I32 init(ByteStreamIn* instream) = 0;
+ virtual BOOL init(ByteStreamIn* instream) = 0;
virtual void done() = 0;
/* Manage an entropy model for a single bit */
diff -r 2d5c4b256a46 -r bdef75161817 src/entropyencoder.hpp
--- a/src/entropyencoder.hpp Sun Jan 30 05:40:05 2011 -0800
+++ b/src/entropyencoder.hpp Mon Jan 31 08:50:56 2011 -0800
@@ -43,7 +43,7 @@
virtual ~EntropyEncoder() {};
/* Manage decoding */
- virtual I32 init(ByteStreamOut* outstream) = 0;
+ virtual BOOL init(ByteStreamOut* outstream) = 0;
virtual void done() = 0;
/* Manage an entropy model for a single bit */
More information about the Liblas-commits
mailing list