summaryrefslogtreecommitdiff
path: root/indra/llprimitive
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2013-02-01 10:20:44 -0500
committerOz Linden <oz@lindenlab.com>2013-02-01 10:20:44 -0500
commit90bf22ef24fbb8ff3497dd271abc7f7555a4f758 (patch)
treeb059090df378ef876b2c28339d86423a42125f20 /indra/llprimitive
parent510a68134110b06779f34d2dd896a337911d5fef (diff)
add debug logging, ostream support for material ids, and some minor cleanup
Diffstat (limited to 'indra/llprimitive')
-rw-r--r--indra/llprimitive/llmaterialid.cpp7
-rw-r--r--indra/llprimitive/llmaterialid.h2
2 files changed, 9 insertions, 0 deletions
diff --git a/indra/llprimitive/llmaterialid.cpp b/indra/llprimitive/llmaterialid.cpp
index 590f5cd91f..820f62c43c 100644
--- a/indra/llprimitive/llmaterialid.cpp
+++ b/indra/llprimitive/llmaterialid.cpp
@@ -150,6 +150,13 @@ std::string LLMaterialID::asString() const
return materialIDString;
}
+std::ostream& operator<<(std::ostream& s, const LLMaterialID &material_id)
+{
+ s << material_id.asString();
+ return s;
+}
+
+
void LLMaterialID::parseFromBinary (const LLSD::Binary& pMaterialID)
{
llassert(pMaterialID.size() == (MATERIAL_ID_SIZE * sizeof(U8)));
diff --git a/indra/llprimitive/llmaterialid.h b/indra/llprimitive/llmaterialid.h
index 9db4065302..0a95204085 100644
--- a/indra/llprimitive/llmaterialid.h
+++ b/indra/llprimitive/llmaterialid.h
@@ -60,6 +60,8 @@ public:
LLSD asLLSD() const;
std::string asString() const;
+ friend std::ostream& operator<<(std::ostream& s, const LLMaterialID &material_id);
+
static const LLMaterialID null;
private: