[Liblas-commits] hg: 2 new changesets

liblas-commits at liblas.org liblas-commits at liblas.org
Tue Oct 26 19:43:16 EDT 2010


changeset ed2f36704a24 in /Volumes/Data/www/liblas.org/hg
details: http://hg.liblas.orghg?cmd=changeset;node=ed2f36704a24
summary: Use stringstream instead of printf with GCC-specific flags.

changeset 1a64145ea9c5 in /Volumes/Data/www/liblas.org/hg
details: http://hg.liblas.orghg?cmd=changeset;node=1a64145ea9c5
summary: Removed declaration of IndexCell that does not declare anything

diffstat:

 apps/lasindex_test.cpp      |  28 ++++++++++++----------------
 include/liblas/lasindex.hpp |   1 -
 2 files changed, 12 insertions(+), 17 deletions(-)

diffs (63 lines):

diff -r a03892d12365 -r 1a64145ea9c5 apps/lasindex_test.cpp
--- a/apps/lasindex_test.cpp	Tue Oct 26 23:18:37 2010 +0100
+++ b/apps/lasindex_test.cpp	Wed Oct 27 00:43:04 2010 +0100
@@ -559,13 +559,11 @@
 										if (FilterResult.size())
 										{
 											// do something with the list of points
-											#ifdef VISUAL_8
-											fprintf(debugger, "Points within filter area %d of %d, %s\n", FilterResult.size(), 
-												index.GetPointRecordsCount(), "User-defined filter bounds");
-											#else // VISUAL_8
-											fprintf(debugger, "Points within filter area %zu of %d, %s\n", FilterResult.size(), 
-												index.GetPointRecordsCount(), "User-defined filter bounds");
-											#endif // VISUAL_8
+											std::ostringstream oss;
+											oss << "Points within filter area " << FilterResult.size() 
+												<< " of " << index.GetPointRecordsCount()
+												<< ",\nUser-defined filter bounds" << std::endl;
+											fprintf(debugger, "%s", oss.str().c_str());
 										}
 										else
 											IndexFilterNoPoints(debugger);
@@ -660,13 +658,11 @@
 											if (FilterResult.size())
 											{
 												// do something with the list of points
-												#ifdef VISUAL_8
-												fprintf(debugger, "Points within filter area %d of %d, %s\n", FilterResult.size(), 
-													index.GetPointRecordsCount(), CovgStr);
-												#else // VISUAL_8
-												fprintf(debugger, "Points within filter area %zu of %d, %s\n", FilterResult.size(), 
-													index.GetPointRecordsCount(), CovgStr);
-												#endif // VISUAL_8
+												std::ostringstream oss;
+												oss << "Points within filter area " << FilterResult.size() 
+													<< " of " << index.GetPointRecordsCount() 
+													<< ", " << CovgStr << std::endl;
+												fprintf(debugger, "%s", oss.str().c_str());
 											}
 											else
 												IndexFilterNoPoints(debugger);
@@ -693,8 +689,8 @@
 					if (static_cast<std::ifstream&>(*idxstrm))
 						static_cast<std::ifstream&>(*idxstrm).close();
 				} // if
-				if (idxreader)
-					delete idxreader;
+
+				delete idxreader;
 				delete reader;
 			} // if reader
 		
diff -r a03892d12365 -r 1a64145ea9c5 include/liblas/lasindex.hpp
--- a/include/liblas/lasindex.hpp	Tue Oct 26 23:18:37 2010 +0100
+++ b/include/liblas/lasindex.hpp	Wed Oct 27 00:43:04 2010 +0100
@@ -75,7 +75,6 @@
 typedef std::vector<liblas::detail::IndexCell> IndexCellRow;
 typedef std::vector<IndexCellRow>	IndexCellDataBlock;
 
-class liblas::detail::IndexCell;
 class IndexData;
 class IndexIterator;
 


More information about the Liblas-commits mailing list