diff options
Diffstat (limited to 'indra/llcommon')
| -rwxr-xr-x | indra/llcommon/llpointer.h | 2 | ||||
| -rw-r--r-- | indra/llcommon/lltrace.h | 4 | ||||
| -rw-r--r-- | indra/llcommon/llunit.h | 3 | ||||
| -rw-r--r-- | 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 e640ffd595..6a0a8fcb0d 100755 --- a/indra/llcommon/llpointer.h +++ b/indra/llcommon/llpointer.h @@ -193,7 +193,7 @@ public:  	{  		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 343e1b16e8..c20e836f77 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 a5406fb3f0..f48cbe0e11 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 2a941e8229..33e30f9688 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 | 
