[Liblas-commits] hg: Fixed mixed bool and int types. Added TODO/FIXME comments.

liblas-commits at liblas.org liblas-commits at liblas.org
Tue Oct 12 06:47:24 EDT 2010


changeset 55737d02b3bb in /Volumes/Data/www/liblas.org/hg
details: http://hg.liblas.orghg?cmd=changeset;node=55737d02b3bb
summary: Fixed mixed bool and int types. Added TODO/FIXME comments.

diffstat:

 apps/laskernel.cpp              |   4 +++-
 include/liblas/lasdimension.hpp |  24 ++++++++++++------------
 src/las_c_api.cpp               |   2 ++
 3 files changed, 17 insertions(+), 13 deletions(-)

diffs (79 lines):

diff -r 9dd9c3a2f731 -r 55737d02b3bb apps/laskernel.cpp
--- a/apps/laskernel.cpp	Tue Oct 12 11:20:22 2010 +0100
+++ b/apps/laskernel.cpp	Tue Oct 12 11:48:34 2010 +0100
@@ -25,9 +25,11 @@
     return istrm;
 }
 
-std::string TryReadFileData(std::string filename)
+std::string TryReadFileData(std::string const& filename)
 {
     std::vector<char> data = TryReadRawFileData(filename);
+
+    // FIXME: What is this construction supposed to grab? --mloskot
     return std::string(data.front(), (std::size_t) data.size());
 }
 
diff -r 9dd9c3a2f731 -r 55737d02b3bb include/liblas/lasdimension.hpp
--- a/include/liblas/lasdimension.hpp	Tue Oct 12 11:20:22 2010 +0100
+++ b/include/liblas/lasdimension.hpp	Tue Oct 12 11:48:34 2010 +0100
@@ -211,28 +211,28 @@
 
 struct SetRequired
 {
-  SetRequired(bool req):req_(req){}
+    SetRequired(bool req) : req_(req) {}
 
-  void operator()(Dimension& e)
-  {
-      e.IsRequired(req_);
-  }
+    void operator()(Dimension& e)
+    {
+        e.IsRequired(req_);
+    }
 
 private:
-  int req_;
+    bool req_;
 };
 
 struct SetActive
 {
-  SetActive(bool req):req_(req){}
+    SetActive(bool req) : req_(req) {}
 
-  void operator()(Dimension& e)
-  {
-      e.IsActive(req_);
-  }
+    void operator()(Dimension& e)
+    {
+        e.IsActive(req_);
+    }
 
 private:
-  int req_;
+    bool req_;
 };
 
 
diff -r 9dd9c3a2f731 -r 55737d02b3bb src/las_c_api.cpp
--- a/src/las_c_api.cpp	Tue Oct 12 11:20:22 2010 +0100
+++ b/src/las_c_api.cpp	Tue Oct 12 11:48:34 2010 +0100
@@ -2043,6 +2043,7 @@
     VALIDATE_LAS_POINTER1(hFormat, "LASSchema_GetByteSize", 0);
     
     liblas::Schema* format = ((liblas::Schema*) hFormat);
+    // TODO: I'd advise to change API to return built-in C type size_t --mloskot
     return format->GetByteSize();    
 }
 
@@ -2052,6 +2053,7 @@
     VALIDATE_LAS_POINTER1(hFormat, "LASSchema_GetBaseByteSize", 0);
     
     liblas::Schema* format = ((liblas::Schema*) hFormat);
+    // TODO: I'd advise to change API to return built-in C type size_t --mloskot
     return format->GetByteSize();    
 }
 


More information about the Liblas-commits mailing list