[Liblas-commits] hg: VS2010 lint

liblas-commits at liblas.org liblas-commits at liblas.org
Wed Jan 19 11:30:19 EST 2011


details:   http://hg.liblas.orghg/rev/f32cc02952bf
changeset: 2788:f32cc02952bf
user:      Michael P. Gerlek <mpg at flaxen.com>
date:      Wed Jan 19 08:29:22 2011 -0800
description:
VS2010 lint
Subject: hg: boost path fix

details:   http://hg.liblas.orghg/rev/3260e6d888af
changeset: 2789:3260e6d888af
user:      Michael P. Gerlek <mpg at flaxen.com>
date:      Wed Jan 19 08:29:43 2011 -0800
description:
boost path fix
Subject: hg: pull-merge

details:   http://hg.liblas.orghg/rev/3bef354aaca7
changeset: 2790:3bef354aaca7
user:      Michael P. Gerlek <mpg at flaxen.com>
date:      Wed Jan 19 08:30:11 2011 -0800
description:
pull-merge

diffstat:

 apps/laskernel.cpp                                 |   51 ++-
 csharp-new/liblas_swig_cpp/liblas_swig_cpp.vcxproj |    8 +-
 include/liblas/detail/sha1.hpp                     |  332 ++++++++++----------
 3 files changed, 202 insertions(+), 189 deletions(-)

diffs (truncated from 565 to 300 lines):

diff -r c5c07e9d970d -r 3bef354aaca7 apps/laskernel.cpp
--- a/apps/laskernel.cpp	Wed Jan 19 08:48:39 2011 -0600
+++ b/apps/laskernel.cpp	Wed Jan 19 08:30:11 2011 -0800
@@ -222,7 +222,8 @@
         
     }     catch (liblas::property_tree::ptree_bad_path const& ) 
     {
-        std::cerr << "Unable to write header point return count info.  Does the outputted file have any points?";
+        std::cerr << "Unable to write header point return count info.  "
+                     "Does the outputted file have any points?";
         return;
     }
     
@@ -239,54 +240,66 @@
 return false;
 }
 
-liblas::FilterPtr  MakeReturnFilter(std::vector<boost::uint16_t> const& returns, liblas::FilterI::FilterType ftype) 
+liblas::FilterPtr MakeReturnFilter( std::vector<boost::uint16_t> const& returns, 
+                                    liblas::FilterI::FilterType ftype) 
 {
-
-    liblas::ReturnFilter* return_filter = new liblas::ReturnFilter(returns, false);
+    typedef liblas::ReturnFilter filter;
+    filter* return_filter = new filter(returns, false);
     return_filter->SetType(ftype);
     return liblas::FilterPtr(return_filter);
 }
 
-liblas::FilterPtr  MakeClassFilter(std::vector<liblas::Classification> const& classes, liblas::FilterI::FilterType ftype) 
+liblas::FilterPtr MakeClassFilter(std::vector<liblas::Classification> const& classes, 
+                                  liblas::FilterI::FilterType ftype) 
 {
-
-    liblas::ClassificationFilter* class_filter = new liblas::ClassificationFilter(classes); 
+    typedef liblas::ClassificationFilter filter;
+    filter* class_filter = new filter(classes); 
     class_filter->SetType(ftype);
     return liblas::FilterPtr(class_filter);
 }
 
-liblas::FilterPtr  MakeBoundsFilter(liblas::Bounds<double> const& bounds, liblas::FilterI::FilterType ftype) 
+liblas::FilterPtr MakeBoundsFilter(liblas::Bounds<double> const& bounds, 
+                                   liblas::FilterI::FilterType ftype) 
 {
-    liblas::BoundsFilter* bounds_filter = new liblas::BoundsFilter(bounds);
+    typedef liblas::BoundsFilter filter;
+    filter* bounds_filter = new filter(bounds);
     bounds_filter->SetType(ftype);
     return liblas::FilterPtr(bounds_filter);
 }
 
-liblas::FilterPtr  MakeIntensityFilter(std::string intensities, liblas::FilterI::FilterType ftype) 
+liblas::FilterPtr MakeIntensityFilter(std::string intensities, 
+                                      liblas::FilterI::FilterType ftype) 
 {
-    liblas::ContinuousValueFilter<boost::uint16_t>::filter_func f = &liblas::Point::GetIntensity;
-    liblas::ContinuousValueFilter<boost::uint16_t>* intensity_filter = new liblas::ContinuousValueFilter<boost::uint16_t>(f, intensities);
+    typedef liblas::ContinuousValueFilter<boost::uint16_t> filter;
+    filter::filter_func f = &liblas::Point::GetIntensity;
+    filter* intensity_filter = new filter(f, intensities);
     intensity_filter->SetType(ftype);
     return liblas::FilterPtr(intensity_filter);
 }
 
-liblas::FilterPtr MakeTimeFilter(std::string times, liblas::FilterI::FilterType ftype) 
+liblas::FilterPtr MakeTimeFilter(std::string times, 
+                                 liblas::FilterI::FilterType ftype) 
 {
-    liblas::ContinuousValueFilter<double>::filter_func f = &liblas::Point::GetTime;
-    liblas::ContinuousValueFilter<double>* time_filter = new liblas::ContinuousValueFilter<double>(f, times);
+    typedef liblas::ContinuousValueFilter<double> filter;
+    filter::filter_func f = &liblas::Point::GetTime;
+    filter* time_filter = new filter(f, times);
     time_filter->SetType(ftype);
     return liblas::FilterPtr(time_filter);
 }
 
-liblas::FilterPtr MakeScanAngleFilter(std::string intensities, liblas::FilterI::FilterType ftype) 
+liblas::FilterPtr MakeScanAngleFilter(std::string intensities, 
+                                      liblas::FilterI::FilterType ftype) 
 {
-    liblas::ContinuousValueFilter<boost::int8_t>::filter_func f = &liblas::Point::GetScanAngleRank;
-    liblas::ContinuousValueFilter<boost::int8_t>* intensity_filter = new liblas::ContinuousValueFilter<boost::int8_t>(f, intensities);
+    typedef liblas::ContinuousValueFilter<boost::int8_t> filter;
+    filter::filter_func f = &liblas::Point::GetScanAngleRank;
+    filter* intensity_filter = new filter(f, intensities);
     intensity_filter->SetType(ftype);
     return liblas::FilterPtr(intensity_filter);
 }
 
-liblas::FilterPtr MakeColorFilter(liblas::Color const& low, liblas::Color const& high, liblas::FilterI::FilterType ftype)
+liblas::FilterPtr MakeColorFilter(liblas::Color const& low, 
+                                  liblas::Color const& high, 
+                                  liblas::FilterI::FilterType ftype)
 {
     liblas::ColorFilter* filter = new liblas::ColorFilter(low, high);
     filter->SetType(ftype);
diff -r c5c07e9d970d -r 3bef354aaca7 csharp-new/liblas_swig_cpp/liblas_swig_cpp.vcxproj
--- a/csharp-new/liblas_swig_cpp/liblas_swig_cpp.vcxproj	Wed Jan 19 08:48:39 2011 -0600
+++ b/csharp-new/liblas_swig_cpp/liblas_swig_cpp.vcxproj	Wed Jan 19 08:30:11 2011 -0800
@@ -117,7 +117,7 @@
     <ClCompile>
       <WarningLevel>Level3</WarningLevel>
       <Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>..\..\include;C:\Program Files %28x86%29\boost\boost_1_44;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>..\..\include;C:\Utils\boost_1_45_0;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
       <RuntimeTypeInfo>true</RuntimeTypeInfo>
       <PreprocessorDefinitions>WIN32;_WINDOWS;_DEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNING;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@@ -133,7 +133,7 @@
     <ClCompile>
       <WarningLevel>Level3</WarningLevel>
       <Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>..\..\include;C:\Program Files %28x86%29\boost\boost_1_44;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>..\..\include;C:\Utils\boost_1_45_0;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
       <RuntimeTypeInfo>true</RuntimeTypeInfo>
       <PreprocessorDefinitions>WIN32;_WINDOWS;_DEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNING;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@@ -151,7 +151,7 @@
       <Optimization>MaxSpeed</Optimization>
       <FunctionLevelLinking>true</FunctionLevelLinking>
       <IntrinsicFunctions>true</IntrinsicFunctions>
-      <AdditionalIncludeDirectories>..\..\include;C:\Program Files %28x86%29\boost\boost_1_44;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>..\..\include;C:\Utils\boost_1_45_0;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
     </ClCompile>
     <Link>
       <GenerateDebugInformation>true</GenerateDebugInformation>
@@ -166,7 +166,7 @@
       <Optimization>MaxSpeed</Optimization>
       <FunctionLevelLinking>true</FunctionLevelLinking>
       <IntrinsicFunctions>true</IntrinsicFunctions>
-      <AdditionalIncludeDirectories>..\..\include;C:\Program Files %28x86%29\boost\boost_1_44;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>..\..\include;C:\Utils\boost_1_45_0;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
     </ClCompile>
     <Link>
       <GenerateDebugInformation>true</GenerateDebugInformation>
diff -r c5c07e9d970d -r 3bef354aaca7 include/liblas/detail/sha1.hpp
--- a/include/liblas/detail/sha1.hpp	Wed Jan 19 08:48:39 2011 -0600
+++ b/include/liblas/detail/sha1.hpp	Wed Jan 19 08:30:11 2011 -0800
@@ -117,21 +117,21 @@
      *  Comments:
      *
      */
-	void Reset()
-	{
-		Length_Low          = 0;
-		Length_High         = 0;
-		Message_Block_Index = 0;
+    void Reset()
+    {
+        Length_Low          = 0;
+        Length_High         = 0;
+        Message_Block_Index = 0;
 
-		H[0]        = 0x67452301;
-		H[1]        = 0xEFCDAB89;
-		H[2]        = 0x98BADCFE;
-		H[3]        = 0x10325476;
-		H[4]        = 0xC3D2E1F0;
+        H[0]        = 0x67452301;
+        H[1]        = 0xEFCDAB89;
+        H[2]        = 0x98BADCFE;
+        H[3]        = 0x10325476;
+        H[4]        = 0xC3D2E1F0;
 
-		Computed    = false;
-		Corrupted   = false;
-	}
+        Computed    = false;
+        Corrupted   = false;
+    }
     
     /*  
      *  Result
@@ -197,9 +197,9 @@
      *  Comments:
      *
      */
-    void Input(unsigned char const* message_array, unsigned int length)
+    void Input(unsigned char const* message_array, std::size_t length)
     {
-		if (0 == message_array || 0 == length)
+        if (0 == message_array || 0 == length)
         {
             return;
         }
@@ -260,10 +260,10 @@
         assert(0 != message_array);
         assert(0 != length);
 
-		typedef unsigned char const* target_type;
-		typedef void const* proxy_type;
+        typedef unsigned char const* target_type;
+        typedef void const* proxy_type;
 
-		target_type p = static_cast<target_type>(static_cast<proxy_type>(message_array));
+        target_type p = static_cast<target_type>(static_cast<proxy_type>(message_array));
         Input(p, length);
     }
     
@@ -283,10 +283,10 @@
      *  Comments:
      *
      */
-	void Input(unsigned char message_element)
-	{
-		Input(&message_element, 1);
-	}
+    void Input(unsigned char message_element)
+    {
+        Input(&message_element, 1);
+    }
     
     /*  
      *  Input
@@ -304,11 +304,11 @@
      *  Comments:
      *
      */
-	void Input(char message_element)
-	{
-		unsigned char ch = static_cast<unsigned char>(message_element);
-		Input(&ch, 1);
-	}
+    void Input(char message_element)
+    {
+        unsigned char ch = static_cast<unsigned char>(message_element);
+        Input(&ch, 1);
+    }
     
     /*  
      *  operator<<
@@ -328,20 +328,20 @@
      *      Each character is assumed to hold 8 bits of information.
      *
      */
-	SHA1& operator<<(const char *message_array)
-	{
+    SHA1& operator<<(const char *message_array)
+    {
         assert(0 != message_array);
 
         const char* p = message_array;
 
-		while(0 != p && *p)
-		{
-			Input(*p);
-			p++;
-		}
+        while(0 != p && *p)
+        {
+            Input(*p);
+            p++;
+        }
 
-		return *this;
-	}
+        return *this;
+    }
     
     /*  
      *  operator<<
@@ -363,7 +363,7 @@
      */
     SHA1& operator<<(const unsigned char *message_array)
     {
-		assert(0 != message_array);
+        assert(0 != message_array);
 
         const unsigned char *p = message_array;
     
@@ -444,100 +444,100 @@
      *      in the publication.
      *
      */
-	void ProcessMessageBlock()
-	{
-		const unsigned K[] =
-		{               // Constants defined for SHA-1
-			0x5A827999,
-			0x6ED9EBA1,
-			0x8F1BBCDC,
-			0xCA62C1D6
-		};
+    void ProcessMessageBlock()
+    {
+        const unsigned K[] =
+        {               // Constants defined for SHA-1
+            0x5A827999,
+            0x6ED9EBA1,
+            0x8F1BBCDC,
+            0xCA62C1D6
+        };
 
-		int t = 0; // Loop counter
-		unsigned int temp = 0; // Temporary word value
-		unsigned int W[80]; // Word sequence
-		unsigned int A = 0; // Word buffers
-		unsigned int B = 0;


More information about the Liblas-commits mailing list