[Liblas-commits] hg: cast size now that we've already checked it's
less than 0
liblas-commits at liblas.org
liblas-commits at liblas.org
Fri May 7 11:53:43 EDT 2010
changeset b0e958797e3e in /Volumes/Data/www/liblas.org/hg
details: http://hg.liblas.orghg?cmd=changeset;node=b0e958797e3e
summary: cast size now that we've already checked it's less than 0
diffstat:
src/detail/writer/point.cpp | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diffs (13 lines):
diff -r d6a9d0b414a4 -r b0e958797e3e src/detail/writer/point.cpp
--- a/src/detail/writer/point.cpp Fri May 07 10:51:59 2010 -0500
+++ b/src/detail/writer/point.cpp Fri May 07 10:53:37 2010 -0500
@@ -178,7 +178,8 @@
detail::write_n(GetStream(), *m_blanks, static_cast<std::streamsize>(size));
- } else if (data.size() < size){
+ } else if (data.size() < static_cast<uint32_t>(size)){
+ // size can be casted now that we have already checked if it is less than 0
int16_t difference = size - data.size();
detail::write_n(GetStream(), data.front(), data.size());
detail::write_n(GetStream(), *m_blanks, static_cast<std::streamsize>(difference));
More information about the Liblas-commits
mailing list