[Liblas-commits] laszip: add cast for vs2010;
consolidate byte writer path
liblas-commits at liblas.org
liblas-commits at liblas.org
Fri Dec 17 23:12:26 EST 2010
changeset b809c3c0b3bf in /Volumes/Data/www/liblas.org/laszip
details: http://hg.liblas.orglaszip?cmd=changeset;node=b809c3c0b3bf
summary: add cast for vs2010; consolidate byte writer path
diffstat:
src/bytestreamout_ostream.hpp | 20 +++++++-------------
1 files changed, 7 insertions(+), 13 deletions(-)
diffs (64 lines):
diff -r df98c890f766 -r b809c3c0b3bf src/bytestreamout_ostream.hpp
--- a/src/bytestreamout_ostream.hpp Fri Dec 17 19:44:46 2010 -0800
+++ b/src/bytestreamout_ostream.hpp Fri Dec 17 20:12:22 2010 -0800
@@ -123,26 +123,23 @@
inline bool ByteStreamOutOstream::putBytes(unsigned char* bytes, unsigned int num_bytes)
{
- stream->write(bytes, num_bytes);
+ stream->write((const char*)bytes, num_bytes);
return !!(stream->good());
}
inline bool ByteStreamOutOstream::put16bits(unsigned char* bytes)
{
- stream->write(bytes, 2);
- return !!(stream->good());
+ return putBytes(bytes, 2);
}
inline bool ByteStreamOutOstream::put32bits(unsigned char* bytes)
{
- stream->write(bytes, 4);
- return !!(stream->good());
+ return putBytes(bytes, 4);
}
inline bool ByteStreamOutOstream::put64bits(unsigned char* bytes)
{
- stream->write(bytes, 8);
- return !!(stream->good());
+ return putBytes(bytes, 8);
}
inline bool ByteStreamOutOstream::isSeekable() const
@@ -192,8 +189,7 @@
{
swapped[0] = bytes[1];
swapped[1] = bytes[0];
- stream->write(swapped, 2);
- return !!(stream->good());
+ return putBytes(swapped, 2);
}
inline bool ByteStreamOutOstreamEndianSwapped::put32bits(unsigned char* bytes)
@@ -202,8 +198,7 @@
swapped[1] = bytes[2];
swapped[2] = bytes[1];
swapped[3] = bytes[0];
- stream->write(swapped, 4);
- return !!(stream->good());
+ return putBytes(swapped, 4);
}
inline bool ByteStreamOutOstreamEndianSwapped::put64bits(unsigned char* bytes)
@@ -216,8 +211,7 @@
swapped[5] = bytes[2];
swapped[6] = bytes[1];
swapped[7] = bytes[0];
- stream->write(swapped, 8);
- return !!(stream->good());
+ return putBytes(swapped, 8);
}
#endif
More information about the Liblas-commits
mailing list