From 60b625588faec2472597dae50331b2ce95ce40a2 Mon Sep 17 00:00:00 2001
From: Richard Linden <none@none>
Date: Wed, 5 Jun 2013 19:57:07 -0700
Subject: [PATCH] BUILDFIX: build fixes for mac

---
 indra/llcommon/llpointer.h            | 2 +-
 indra/llcommon/lltrace.h              | 4 ++--
 indra/llcommon/llunit.h               | 3 ++-
 indra/llcommon/tests/llunits_test.cpp | 6 +++---
 4 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/indra/llcommon/llpointer.h b/indra/llcommon/llpointer.h
index e640ffd5950..6a0a8fcb0d9 100755
--- a/indra/llcommon/llpointer.h
+++ b/indra/llcommon/llpointer.h
@@ -193,7 +193,7 @@ class LLCopyOnWritePointer : public LLPointer<Type>
 	{
 		if (pointer_t::notNull() && pointer_t::mPointer->getNumRefs() > 1)
 		{
-			*(pointer_t*)(this) = new Type(*pointer_t::mPointer);
+			*(pointer_t* )(this) = new Type(*pointer_t::mPointer);
 		}
 	}
 
diff --git a/indra/llcommon/lltrace.h b/indra/llcommon/lltrace.h
index 343e1b16e80..c20e836f775 100644
--- a/indra/llcommon/lltrace.h
+++ b/indra/llcommon/lltrace.h
@@ -657,7 +657,7 @@ class EventStatHandle
 :	public TraceType<EventAccumulator>
 {
 public:
-	typedef typename F64 storage_t;
+	typedef F64 storage_t;
 	typedef TraceType<EventAccumulator> trace_t;
 
 	EventStatHandle(const char* name, const char* description = NULL)
@@ -702,7 +702,7 @@ class CountStatHandle
 :	public TraceType<CountAccumulator>
 {
 public:
-	typedef typename F64 storage_t;
+	typedef F64 storage_t;
 	typedef TraceType<CountAccumulator> trace_t;
 
 	CountStatHandle(const char* name, const char* description = NULL) 
diff --git a/indra/llcommon/llunit.h b/indra/llcommon/llunit.h
index a5406fb3f01..f48cbe0e11f 100644
--- a/indra/llcommon/llunit.h
+++ b/indra/llcommon/llunit.h
@@ -41,6 +41,7 @@ struct ConversionFactor
 	{
 		// spurious use of dependent type to stop gcc from triggering the static assertion before instantiating the template
 		llstatic_assert_template(DERIVED_UNITS_TAG, false,  "Cannot convert between types.");
+        return 0;
 	}
 };
 
@@ -473,7 +474,7 @@ LL_DECLARE_DERIVED_UNIT(1000 * 1000, Hertz, Megahertz, "MHz");
 LL_DECLARE_DERIVED_UNIT(1000 * 1000 * 1000, Hertz, Gigahertz, "GHz");
 
 LL_DECLARE_BASE_UNIT(Radians, "rad");
-LL_DECLARE_DERIVED_UNIT(DEG_TO_RAD, Radians, Degrees, "deg");
+LL_DECLARE_DERIVED_UNIT(0.01745329251994, Radians, Degrees, "deg");
 
 
 } // namespace LLUnits
diff --git a/indra/llcommon/tests/llunits_test.cpp b/indra/llcommon/tests/llunits_test.cpp
index 2a941e8229b..33e30f9688c 100644
--- a/indra/llcommon/tests/llunits_test.cpp
+++ b/indra/llcommon/tests/llunits_test.cpp
@@ -33,9 +33,9 @@
 namespace LLUnits
 {
 	// using powers of 2 to allow strict floating point equality
-	struct Quatloos { typedef Quatloos base_unit_t; };
-	LL_DECLARE_DERIVED_UNIT(4, Quatloos, Latinum);
-	LL_DECLARE_DERIVED_UNIT((1.0 / 4.0), Quatloos, Solari);
+	LL_DECLARE_BASE_UNIT(Quatloos, "Quat");
+	LL_DECLARE_DERIVED_UNIT(4, Quatloos, Latinum, "Lat");
+	LL_DECLARE_DERIVED_UNIT((1.0 / 4.0), Quatloos, Solari, "Sol");
 }
 
 namespace tut
-- 
GitLab