[Liblas-commits] laszip: 2 new changesets
liblas-commits at liblas.org
liblas-commits at liblas.org
Wed Dec 15 11:38:05 EST 2010
changeset bf36cb687f49 in /Volumes/Data/www/liblas.org/laszip
details: http://hg.liblas.orglaszip?cmd=changeset;node=bf36cb687f49
summary: reinsert lost changes
changeset f066092800a9 in /Volumes/Data/www/liblas.org/laszip
details: http://hg.liblas.orglaszip?cmd=changeset;node=f066092800a9
summary: reinsert lost changes
diffstat:
src/bytestreamin_istream.hpp | 16 ++++++++++------
src/bytestreamout_ostream.hpp | 12 ++++++------
2 files changed, 16 insertions(+), 12 deletions(-)
diffs (92 lines):
diff -r e4af65b349e7 -r f066092800a9 src/bytestreamin_istream.hpp
--- a/src/bytestreamin_istream.hpp Wed Dec 15 08:27:40 2010 -0800
+++ b/src/bytestreamin_istream.hpp Wed Dec 15 08:37:53 2010 -0800
@@ -76,13 +76,13 @@
#endif
};
-ByteStreamInIstream::ByteStreamInIstream(istream* stream)
+inline ByteStreamInIstream::ByteStreamInIstream(istream* stream)
{
this->stream = stream;
resetCount();
}
-unsigned int ByteStreamInIstream::getByte()
+inline unsigned int ByteStreamInIstream::getByte()
{
int byte = stream->get();
if (stream->eof())
@@ -93,13 +93,17 @@
return (unsigned int)byte;
}
-bool ByteStreamInIstream::getBytes(unsigned char* bytes, unsigned int num_bytes)
+inline bool ByteStreamInIstream::getBytes(unsigned char* bytes, unsigned int num_bytes)
{
- stream->read(bytes, num_bytes);
+
+ // http://stackoverflow.com/questions/604431/c-reading-unsigned-char-from-file-stream
+ // WARNING, unsafe cast!!! -- hobu
+
+ stream->read( (char*) bytes, num_bytes);
return !!(stream->good());
}
-unsigned int ByteStreamInIstream::byteCount() const
+inline unsigned int ByteStreamInIstream::byteCount() const
{
#if _MSC_VER < 1300
return (stream->tellg() - start);
@@ -110,7 +114,7 @@
#endif
}
-void ByteStreamInIstream::resetCount()
+inline void ByteStreamInIstream::resetCount()
{
start = stream->tellg();
}
diff -r e4af65b349e7 -r f066092800a9 src/bytestreamout_ostream.hpp
--- a/src/bytestreamout_ostream.hpp Wed Dec 15 08:27:40 2010 -0800
+++ b/src/bytestreamout_ostream.hpp Wed Dec 15 08:37:53 2010 -0800
@@ -76,25 +76,25 @@
#endif
};
-ByteStreamOutOstream::ByteStreamOutOstream(ostream* stream)
+inline ByteStreamOutOstream::ByteStreamOutOstream(ostream* stream)
{
this->stream = stream;
resetCount();
}
-bool ByteStreamOutOstream::putByte(unsigned char byte)
+inline bool ByteStreamOutOstream::putByte(unsigned char byte)
{
stream->put(byte);
return !!(stream->good());
}
-bool ByteStreamOutOstream::putBytes(unsigned char* bytes, unsigned int num_bytes)
+inline bool ByteStreamOutOstream::putBytes(unsigned char* bytes, unsigned int num_bytes)
{
- stream->write(bytes, num_bytes);
+ stream->write( (char*) bytes, num_bytes);
return !!(stream->good());
}
-unsigned int ByteStreamOutOstream::byteCount() const
+inline unsigned int ByteStreamOutOstream::byteCount() const
{
#if _MSC_VER < 1300
return (stream->tellp() - start);
@@ -105,7 +105,7 @@
#endif
}
-void ByteStreamOutOstream::resetCount()
+inline void ByteStreamOutOstream::resetCount()
{
start = stream->tellp();
}
More information about the Liblas-commits
mailing list