From f27ef7c31a5128f2fd97b3f4b503a9b040d674f7 Mon Sep 17 00:00:00 2001
From: Andrew Meadows <andrew@lindenlab.com>
Date: Wed, 7 Feb 2007 21:58:58 +0000
Subject: [PATCH] Removed the #ifndef NO_RTTI hack. Moved the LLSD related
 methods of LLVector3 to NOT be inline, as per MarkL's suggestion.

---
 indra/llmath/v3math.cpp | 27 ++++++++++++++++++++++++++
 indra/llmath/v3math.h   | 43 ++++++++---------------------------------
 2 files changed, 35 insertions(+), 35 deletions(-)

diff --git a/indra/llmath/v3math.cpp b/indra/llmath/v3math.cpp
index f254f4112ed..9e6084565ed 100644
--- a/indra/llmath/v3math.cpp
+++ b/indra/llmath/v3math.cpp
@@ -179,6 +179,33 @@ LLVector3::LLVector3(const LLVector4 &vec)
 	mV[VZ] = (F32)vec.mV[VZ];
 }
 
+LLVector3::LLVector3(const LLSD& sd)
+{
+	setValue(sd);
+}
+
+LLSD LLVector3::getValue() const
+{
+	LLSD ret;
+	ret[0] = mV[0];
+	ret[1] = mV[1];
+	ret[2] = mV[2];
+	return ret;
+}
+
+void LLVector3::setValue(const LLSD& sd)
+{
+	mV[0] = (F32) sd[0].asReal();
+	mV[1] = (F32) sd[1].asReal();
+	mV[2] = (F32) sd[2].asReal();
+}
+
+const LLVector3& LLVector3::operator=(const LLSD& sd)
+{
+	setValue(sd);
+	return *this;
+}
+
 const LLVector3& operator*=(LLVector3 &a, const LLQuaternion &rot)
 {
     const F32 rw = - rot.mQ[VX] * a.mV[VX] - rot.mQ[VY] * a.mV[VY] - rot.mQ[VZ] * a.mV[VZ];
diff --git a/indra/llmath/v3math.h b/indra/llmath/v3math.h
index 8949ef01124..72372c07e97 100644
--- a/indra/llmath/v3math.h
+++ b/indra/llmath/v3math.h
@@ -12,11 +12,7 @@
 #include "llerror.h"
 #include "llmath.h"
 
-#ifndef NO_RTTI
-// LLSD includes LLString which is incompatible with some other
-// stuff (Havok) that requires -fno-rtti
-#	include "llsd.h"
-#endif
+#include "llsd.h"
 class LLVector4;
 class LLMatrix3;
 class LLVector3d;
@@ -45,36 +41,13 @@ class LLVector3
 		inline explicit LLVector3(const F32 *vec);				// Initializes LLVector3 to (vec[0]. vec[1], vec[2])
 		explicit LLVector3(const LLVector3d &vec);				// Initializes LLVector3 to (vec[0]. vec[1], vec[2])
 		explicit LLVector3(const LLVector4 &vec);				// Initializes LLVector4 to (vec[0]. vec[1], vec[2])
-#ifndef NO_RTTI
-// LLSD includes LLString which is incompatible with some other
-// stuff (Havok) that requires -fno-rtti
-		LLVector3(const LLSD& sd)
-		{
-			setValue(sd);
-		}
-
-		LLSD getValue() const
-		{
-			LLSD ret;
-			ret[0] = mV[0];
-			ret[1] = mV[1];
-			ret[2] = mV[2];
-			return ret;
-		}
-
-		void setValue(const LLSD& sd)
-		{
-			mV[0] = (F32) sd[0].asReal();
-			mV[1] = (F32) sd[1].asReal();
-			mV[2] = (F32) sd[2].asReal();
-		}
-
-		const LLVector3& operator=(const LLSD& sd)
-		{
-			setValue(sd);
-			return *this;
-		}
-#endif
+		LLVector3(const LLSD& sd);
+
+		LLSD getValue() const;
+
+		void setValue(const LLSD& sd);
+
+		const LLVector3& operator=(const LLSD& sd);
 
 		inline BOOL isFinite() const;									// checks to see if all values of LLVector3 are finite
 		BOOL		clamp(F32 min, F32 max);		// Clamps all values to (min,max), returns TRUE if data changed
-- 
GitLab