[Liblas-commits] hg: 2 new changesets
liblas-commits at liblas.org
liblas-commits at liblas.org
Mon Oct 19 19:03:40 EDT 2009
changeset cb4e19c0ba4d in /home/www/liblas.org/hg
details: http://hg.liblas.org/main/hg?cmd=changeset;node=cb4e19c0ba4d
summary: Explicitly marked unused variables
changeset c402c23bd5aa in /home/www/liblas.org/hg
details: http://hg.liblas.org/main/hg?cmd=changeset;node=c402c23bd5aa
summary: Fixed bug with missing strncasecmp in las2las.c - use macro
diffstat:
apps/las2las.c | 7 ++++++-
src/detail/reader.cpp | 13 ++++++++++---
2 files changed, 16 insertions(+), 4 deletions(-)
diffs (51 lines):
diff -r 845f0ec7b4c3 -r c402c23bd5aa apps/las2las.c
--- a/apps/las2las.c Mon Oct 19 23:49:14 2009 +0100
+++ b/apps/las2las.c Tue Oct 20 00:03:20 2009 +0100
@@ -19,6 +19,11 @@
#include <stdlib.h>
#include <string.h>
+#ifdef _WIN32
+#define compare_no_case(a,b,n) _strnicmp( (a), (b), (n) )
+#else
+#define compare_no_case(a,b,n) strncasecmp( (a), (b), (n) )
+#endif
LASPointSummary* SummarizePoints(LASReaderH reader);
void print_point_summary(FILE *file, LASPointSummary* summary, LASHeaderH header);
@@ -354,7 +359,7 @@
)
{
i++;
- if (!strncasecmp(argv[i], "min", 3)) {
+ if (!compare_no_case(argv[i], "min", 3)) {
use_min_offset = TRUE;
do_set_offset = TRUE;
} else
diff -r 845f0ec7b4c3 -r c402c23bd5aa src/detail/reader.cpp
--- a/src/detail/reader.cpp Mon Oct 19 23:49:14 2009 +0100
+++ b/src/detail/reader.cpp Tue Oct 20 00:03:20 2009 +0100
@@ -286,13 +286,20 @@
// If our little test reads off the end, we'll try to put the
// borken dishes back up in the cabinet
- try {
+ try
+ {
detail::read_n(pad1, m_ifs, sizeof(uint8_t));
detail::read_n(pad2, m_ifs, sizeof(uint8_t));
- } catch (std::out_of_range& e) {
+ }
+ catch (std::out_of_range& e)
+ {
+ ignore_unused_variable_warning(e);
m_ifs.seekg(current_pos, std::ios::beg);
return false;
- } catch (std::runtime_error& e) {
+ }
+ catch (std::runtime_error& e)
+ {
+ ignore_unused_variable_warning(e);
m_ifs.seekg(current_pos, std::ios::beg);
return false;
}
More information about the Liblas-commits
mailing list