From 29930baf23fbd8cd147cd78f60d01496479ae78e Mon Sep 17 00:00:00 2001
From: Richard Linden <none@none>
Date: Wed, 17 Jul 2013 10:56:47 -0700
Subject: SH-4299 WIP: Interesting: High fps shown temporarily off scale in
 statistics console made unit types work with ostreams fixed timing of scene
 monitor recordings to better respect requested time diff

---
 indra/llcommon/lltracerecording.cpp |  1 -
 indra/llcommon/llunit.h             | 13 +++++++++++++
 2 files changed, 13 insertions(+), 1 deletion(-)

(limited to 'indra/llcommon')

diff --git a/indra/llcommon/lltracerecording.cpp b/indra/llcommon/lltracerecording.cpp
index 5d43771cb2..48b5a7c3fa 100644
--- a/indra/llcommon/lltracerecording.cpp
+++ b/indra/llcommon/lltracerecording.cpp
@@ -41,7 +41,6 @@ namespace LLTrace
 Recording::Recording(EPlayState state) 
 :	mElapsedSeconds(0),
 	mInHandOff(false)
-
 {
 	mBuffers = new AccumulatorBufferGroup();
 	setPlayState(state);
diff --git a/indra/llcommon/llunit.h b/indra/llcommon/llunit.h
index 79465715cf..2e09973ef6 100644
--- a/indra/llcommon/llunit.h
+++ b/indra/llcommon/llunit.h
@@ -138,6 +138,13 @@ protected:
 	storage_t mValue;
 };
 
+template<typename STORAGE_TYPE, typename UNIT_TYPE>
+std::ostream& operator <<(std::ostream& s, const LLUnit<STORAGE_TYPE, UNIT_TYPE>& unit)
+{
+	s << unit.value() << UNIT_TYPE::getUnitLabel();
+	return s;
+}
+
 template<typename STORAGE_TYPE, typename UNIT_TYPE>
 struct LLUnitImplicit : public LLUnit<STORAGE_TYPE, UNIT_TYPE>
 {
@@ -162,6 +169,12 @@ struct LLUnitImplicit : public LLUnit<STORAGE_TYPE, UNIT_TYPE>
 	}
 };
 
+template<typename STORAGE_TYPE, typename UNIT_TYPE>
+std::ostream& operator <<(std::ostream& s, const LLUnitImplicit<STORAGE_TYPE, UNIT_TYPE>& unit)
+{
+	s << unit.value() << UNIT_TYPE::getUnitLabel();
+	return s;
+}
 
 template<typename S1, typename T1, typename S2, typename T2>
 LL_FORCE_INLINE void ll_convert_units(LLUnit<S1, T1> in, LLUnit<S2, T2>& out, ...)
-- 
cgit v1.2.3