[Liblas-commits] r1136 - in trunk: include/liblas src

liblas-commits at liblas.org liblas-commits at liblas.org
Sun Mar 22 16:13:47 EDT 2009


Author: hobu
Date: Sun Mar 22 16:13:46 2009
New Revision: 1136
URL: http://liblas.org/changeset/1136

Log:
fix #116, LASColor has no == operation

Modified:
   trunk/include/liblas/lascolor.hpp
   trunk/src/lascolor.cpp

Modified: trunk/include/liblas/lascolor.hpp
==============================================================================
--- trunk/include/liblas/lascolor.hpp	(original)
+++ trunk/include/liblas/lascolor.hpp	Sun Mar 22 16:13:46 2009
@@ -65,6 +65,9 @@
 
     /// Assignment opreator.
     LASColor& operator=(LASColor const& rhs);
+
+    /// Comparison operator.
+    bool operator==(const LASColor& other) const;
     
     /// Fetch value of the red image channel 
     uint16_t GetRed() const;

Modified: trunk/src/lascolor.cpp
==============================================================================
--- trunk/src/lascolor.cpp	(original)
+++ trunk/src/lascolor.cpp	Sun Mar 22 16:13:46 2009
@@ -72,5 +72,16 @@
     return *this;
 }
 
+bool LASColor::operator==(LASColor const& other) const
+{
+    if (&other == this) return true;
+    
+    if (m_red != other.m_red) return false;
+    if (m_green != other.m_green) return false;
+    if (m_blue != other.m_blue) return false;
+
+    return true;
+}
+
 } // namespace liblas
 


More information about the Liblas-commits mailing list