summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2010-02-19 12:41:08 -0600
committerDave Parks <davep@lindenlab.com>2010-02-19 12:41:08 -0600
commit237f1a1ba362aa2dfd9bb386e431713bdfcad2dc (patch)
treeac01934849f6370576e18aa738a9be50ed5d2fe7 /indra
parent38158f0e14663ac73c7ed79723ba6e34a1253e2a (diff)
Consolidate now preserves materials.
Diffstat (limited to 'indra')
-rw-r--r--indra/llmath/v4color.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/indra/llmath/v4color.h b/indra/llmath/v4color.h
index d6fbdec61e..6b63b976b0 100644
--- a/indra/llmath/v4color.h
+++ b/indra/llmath/v4color.h
@@ -114,6 +114,7 @@ class LLColor4
const LLColor4& operator=(const LLColor3 &a); // Assigns vec3 to vec4 and returns vec4
+ bool operator<(const LLColor4& rhs) const;
friend std::ostream& operator<<(std::ostream& s, const LLColor4 &a); // Print a
friend LLColor4 operator+(const LLColor4 &a, const LLColor4 &b); // Return vector a + b
friend LLColor4 operator-(const LLColor4 &a, const LLColor4 &b); // Return vector a minus b
@@ -595,6 +596,23 @@ inline LLColor4 lerp(const LLColor4 &a, const LLColor4 &b, F32 u)
a.mV[VW] + (b.mV[VW] - a.mV[VW]) * u);
}
+inline bool LLColor4::operator<(const LLColor4& rhs) const
+{
+ if (mV[0] != rhs.mV[0])
+ {
+ return mV[0] < rhs.mV[0];
+ }
+ if (mV[1] != rhs.mV[1])
+ {
+ return mV[1] < rhs.mV[1];
+ }
+ if (mV[2] != rhs.mV[2])
+ {
+ return mV[2] < rhs.mV[2];
+ }
+
+ return mV[3] < rhs.mV[3];
+}
void LLColor4::clamp()
{