diff options
| -rw-r--r-- | indra/llcommon/lldate.cpp | 11 | ||||
| -rw-r--r-- | indra/llcommon/lldate.h | 3 | ||||
| -rw-r--r-- | indra/llcommon/lltimer.cpp | 15 | ||||
| -rw-r--r-- | indra/llcommon/lltimer.h | 21 | ||||
| -rw-r--r-- | indra/llcommon/lltracerecording.cpp | 19 | ||||
| -rw-r--r-- | indra/llcommon/lltracerecording.h | 18 | ||||
| -rw-r--r-- | indra/llcommon/llunit.h | 141 | ||||
| -rw-r--r-- | indra/llmath/v4color.h | 6 | ||||
| -rw-r--r-- | indra/llui/llnotifications.cpp | 2 | ||||
| -rw-r--r-- | indra/newview/llviewertexture.cpp | 4 | 
10 files changed, 86 insertions, 154 deletions
diff --git a/indra/llcommon/lldate.cpp b/indra/llcommon/lldate.cpp index 030ef6a3c7..d8b3dfe6c6 100644 --- a/indra/llcommon/lldate.cpp +++ b/indra/llcommon/lldate.cpp @@ -48,18 +48,15 @@ static const F64 LL_APR_USEC_PER_SEC = 1000000.0;  LLDate::LLDate() : mSecondsSinceEpoch(DATE_EPOCH) -{ -} +{}  LLDate::LLDate(const LLDate& date) :  	mSecondsSinceEpoch(date.mSecondsSinceEpoch) -{ -} +{} -LLDate::LLDate(F64 seconds_since_epoch) : +LLDate::LLDate(LLUnit::Seconds<F64> seconds_since_epoch) :  	mSecondsSinceEpoch(seconds_since_epoch) -{ -} +{}  LLDate::LLDate(const std::string& iso8601_date)  { diff --git a/indra/llcommon/lldate.h b/indra/llcommon/lldate.h index 7ff8b550ad..0500b1dcd8 100644 --- a/indra/llcommon/lldate.h +++ b/indra/llcommon/lldate.h @@ -33,6 +33,7 @@  #include <string>  #include "stdtypes.h" +#include "llunit.h"  /**    * @class LLDate @@ -58,7 +59,7 @@ public:  	 *  	 * @pararm seconds_since_epoch The number of seconds since UTC epoch.  	 */ -	LLDate(F64 seconds_since_epoch); +	LLDate(LLUnit::Seconds<F64> seconds_since_epoch);  	/**   	 * @brief Construct a date from a string representation diff --git a/indra/llcommon/lltimer.cpp b/indra/llcommon/lltimer.cpp index 9ebc6de7f4..05f6b789e4 100644 --- a/indra/llcommon/lltimer.cpp +++ b/indra/llcommon/lltimer.cpp @@ -287,14 +287,15 @@ LLTimer::~LLTimer()  }  // static -U64 LLTimer::getTotalTime() +LLUnit::Microseconds<U64> LLTimer::getTotalTime()  { +	LLUnit::Seconds<F64> sec = LLUnit::Milliseconds<U32>(2000) + LLUnit::Hours<F32>(1.f / 360.f);  	// simply call into the implementation function.  	return totalTime();  }	  // static -F64 LLTimer::getTotalSeconds() +LLUnit::Seconds<F64> LLTimer::getTotalSeconds()  {  	return U64_to_F64(getTotalTime()) * USEC_TO_SEC_F64;  } @@ -343,23 +344,23 @@ U64 getElapsedTimeAndUpdate(U64& lastClockCount)  } -F64 LLTimer::getElapsedTimeF64() const +LLUnit::Seconds<F64> LLTimer::getElapsedTimeF64() const  {  	U64 last = mLastClockCount;  	return (F64)getElapsedTimeAndUpdate(last) * gClockFrequencyInv;  } -F32 LLTimer::getElapsedTimeF32() const +LLUnit::Seconds<F32> LLTimer::getElapsedTimeF32() const  {  	return (F32)getElapsedTimeF64();  } -F64 LLTimer::getElapsedTimeAndResetF64() +LLUnit::Seconds<F64> LLTimer::getElapsedTimeAndResetF64()  {  	return (F64)getElapsedTimeAndUpdate(mLastClockCount) * gClockFrequencyInv;  } -F32 LLTimer::getElapsedTimeAndResetF32() +LLUnit::Seconds<F32> LLTimer::getElapsedTimeAndResetF32()  {  	return (F32)getElapsedTimeAndResetF64();  } @@ -372,7 +373,7 @@ void  LLTimer::setTimerExpirySec(F32 expiration)  		+ (U64)((F32)(expiration * gClockFrequency));  } -F32 LLTimer::getRemainingTimeF32() const +LLUnit::Seconds<F32> LLTimer::getRemainingTimeF32() const  {  	U64 cur_ticks = get_clock_count();  	if (cur_ticks > mExpirationTicks) diff --git a/indra/llcommon/lltimer.h b/indra/llcommon/lltimer.h index 513de0605d..e0a880a346 100644 --- a/indra/llcommon/lltimer.h +++ b/indra/llcommon/lltimer.h @@ -37,6 +37,7 @@  #include <string>  #include <list>  // units conversions +#include "llunit.h"  #ifndef USEC_PER_SEC      const U32	USEC_PER_SEC	= 1000000;  #endif @@ -55,7 +56,7 @@ public:  protected:	  	U64 mLastClockCount;  	U64 mExpirationTicks; -	BOOL mStarted; +	bool mStarted;  public:  	LLTimer(); @@ -66,16 +67,16 @@ public:  	// Return a high precision number of seconds since the start of  	// this application instance. -	static F64 getElapsedSeconds() +	static LLUnit::Seconds<F64> getElapsedSeconds()  	{  		return sTimer->getElapsedTimeF64();  	}  	// Return a high precision usec since epoch -	static U64 getTotalTime(); +	static LLUnit::Microseconds<U64> getTotalTime();  	// Return a high precision seconds since epoch -	static F64 getTotalSeconds(); +	static LLUnit::Seconds<F64> getTotalSeconds();  	// MANIPULATORS @@ -86,18 +87,18 @@ public:  	void setTimerExpirySec(F32 expiration);  	BOOL checkExpirationAndReset(F32 expiration);  	BOOL hasExpired() const; -	F32 getElapsedTimeAndResetF32();	// Returns elapsed time in seconds with reset -	F64 getElapsedTimeAndResetF64(); +	LLUnit::Seconds<F32> getElapsedTimeAndResetF32();	// Returns elapsed time in seconds with reset +	LLUnit::Seconds<F64> getElapsedTimeAndResetF64(); -	F32 getRemainingTimeF32() const; +	LLUnit::Seconds<F32> getRemainingTimeF32() const;  	static BOOL knownBadTimer();  	// ACCESSORS -	F32 getElapsedTimeF32() const;			// Returns elapsed time in seconds -	F64 getElapsedTimeF64() const;			// Returns elapsed time in seconds +	LLUnit::Seconds<F32> getElapsedTimeF32() const;			// Returns elapsed time in seconds +	LLUnit::Seconds<F64> getElapsedTimeF64() const;			// Returns elapsed time in seconds -	BOOL getStarted() const { return mStarted; } +	bool getStarted() const { return mStarted; }  	static U64 getCurrentClockCount();		// Returns the raw clockticks diff --git a/indra/llcommon/lltracerecording.cpp b/indra/llcommon/lltracerecording.cpp index 435c49106f..4252ed57dc 100644 --- a/indra/llcommon/lltracerecording.cpp +++ b/indra/llcommon/lltracerecording.cpp @@ -46,6 +46,25 @@ Recording::Recording()  	mStackTimers(new AccumulatorBuffer<TimerAccumulator>())  {} +Recording::Recording( const Recording& other ) +{ +	llassert(other.mCountsFloat.get() != NULL); +	mSamplingTimer     = other.mSamplingTimer; +	mElapsedSeconds    = other.mElapsedSeconds; +	mCountsFloat       = other.mCountsFloat; +	mMeasurementsFloat = other.mMeasurementsFloat; +	mCounts            = other.mCounts; +	mMeasurements      = other.mMeasurements; +	mStackTimers       = other.mStackTimers; + +	LLStopWatchControlsMixin::initTo(other.getPlayState()); +	if (other.isStarted()) +	{ +		handleStart(); +	} +} + +  Recording::~Recording()  {} diff --git a/indra/llcommon/lltracerecording.h b/indra/llcommon/lltracerecording.h index 31901b599c..fc96631ce0 100644 --- a/indra/llcommon/lltracerecording.h +++ b/indra/llcommon/lltracerecording.h @@ -106,23 +106,7 @@ namespace LLTrace  	public:  		Recording(); -		Recording(const Recording& other) -		{ -			mSamplingTimer     = other.mSamplingTimer; -			mElapsedSeconds    = other.mElapsedSeconds; -			mCountsFloat       = other.mCountsFloat; -			mMeasurementsFloat = other.mMeasurementsFloat; -			mCounts            = other.mCounts; -			mMeasurements      = other.mMeasurements; -			mStackTimers       = other.mStackTimers; - -			LLStopWatchControlsMixin::initTo(other.getPlayState()); -			if (other.isStarted()) -			{ -				handleStart(); -			} - -		} +		Recording(const Recording& other);  		~Recording();  		void makePrimary(); diff --git a/indra/llcommon/llunit.h b/indra/llcommon/llunit.h index 98e4de32fa..4519905707 100644 --- a/indra/llcommon/llunit.h +++ b/indra/llcommon/llunit.h @@ -51,6 +51,11 @@ struct LLUnitType : public BASE_UNIT  		return static_cast<unit_t&>(*this);  	} +	operator storage_t () const +	{ +		return value(); +	} +  	storage_t value() const  	{  		return convertToDerived(mBaseValue); @@ -102,6 +107,11 @@ struct LLUnitType<STORAGE_TYPE, T, T>  		return static_cast<unit_t&>(*this);  	} +	operator storage_t () const +	{ +		return value(); +	} +  	storage_t value() const { return mBaseValue; }  	template<typename CONVERTED_TYPE> @@ -110,7 +120,6 @@ struct LLUnitType<STORAGE_TYPE, T, T>  		return CONVERTED_TYPE(*this).value();  	} -  	static storage_t convertToBase(storage_t derived_value)  	{  		return (storage_t)derived_value; @@ -150,99 +159,77 @@ protected:  	storage_t mBaseValue;  }; -// -// operator + -//  template<typename STORAGE_TYPE, typename BASE_UNIT, typename DERIVED_UNIT> -DERIVED_UNIT operator + (typename LLUnitType<STORAGE_TYPE, BASE_UNIT, DERIVED_UNIT>::storage_t first, LLUnitType<STORAGE_TYPE, BASE_UNIT, DERIVED_UNIT> second) +struct LLUnitTypeWrapper +:	public LLUnitType<STORAGE_TYPE, BASE_UNIT, DERIVED_UNIT>  { -	return DERIVED_UNIT(first + second.value()); -} +	typedef LLUnitType<STORAGE_TYPE, BASE_UNIT, DERIVED_UNIT> unit_t; +	LLUnitTypeWrapper(const unit_t& other) +	:	unit_t(other) +	{} +}; -template<typename STORAGE_TYPE, typename BASE_UNIT, typename DERIVED_UNIT> -DERIVED_UNIT operator + (LLUnitType<STORAGE_TYPE, BASE_UNIT, DERIVED_UNIT> first, typename LLUnitType<STORAGE_TYPE, BASE_UNIT, DERIVED_UNIT>::storage_t second) -{ -	return DERIVED_UNIT(first.value() + second); -} -template<typename STORAGE_TYPE, typename BASE_UNIT, typename DERIVED_UNIT, typename OTHER_DERIVED_UNIT> -DERIVED_UNIT operator + (LLUnitType<STORAGE_TYPE, BASE_UNIT, DERIVED_UNIT> first, LLUnitType<STORAGE_TYPE, BASE_UNIT, OTHER_DERIVED_UNIT> second) +// +// operator + +// +template<typename STORAGE_TYPE, typename BASE_UNIT, typename DERIVED_UNIT, typename STORAGE_TYPE2, typename BASE_UNIT2, typename DERIVED_UNIT2> +DERIVED_UNIT operator + (typename LLUnitType<STORAGE_TYPE, BASE_UNIT, DERIVED_UNIT>::storage_t first, LLUnitType<STORAGE_TYPE2, BASE_UNIT2, DERIVED_UNIT2> second)  { -	return DERIVED_UNIT(first.value() + second.value()); +	return DERIVED_UNIT(first + LLUnitType<STORAGE_TYPE, BASE_UNIT, DERIVED_UNIT>(second).value());  } +  //  // operator -  // -template<typename STORAGE_TYPE, typename BASE_UNIT, typename DERIVED_UNIT> +template<typename STORAGE_TYPE, typename BASE_UNIT, typename DERIVED_UNIT, typename STORAGE_TYPE2, typename BASE_UNIT2, typename DERIVED_UNIT2>  DERIVED_UNIT operator - (typename LLUnitType<STORAGE_TYPE, BASE_UNIT, DERIVED_UNIT>::storage_t first, LLUnitType<STORAGE_TYPE, BASE_UNIT, DERIVED_UNIT> second)  { -	return DERIVED_UNIT(first - second.value()); -} - -template<typename STORAGE_TYPE, typename BASE_UNIT, typename DERIVED_UNIT> -DERIVED_UNIT operator - (LLUnitType<STORAGE_TYPE, BASE_UNIT, DERIVED_UNIT> first, typename LLUnitType<STORAGE_TYPE, BASE_UNIT, DERIVED_UNIT>::storage_t second) -{ -	return DERIVED_UNIT(first.value() - second); -} - -template<typename STORAGE_TYPE, typename BASE_UNIT, typename DERIVED_UNIT, typename OTHER_DERIVED_UNIT> -DERIVED_UNIT operator - (LLUnitType<STORAGE_TYPE, BASE_UNIT, DERIVED_UNIT> first, LLUnitType<STORAGE_TYPE, BASE_UNIT, OTHER_DERIVED_UNIT> second) -{ -	return DERIVED_UNIT(first.value() - second.value()); +	return DERIVED_UNIT(first - LLUnitType<STORAGE_TYPE, BASE_UNIT, DERIVED_UNIT>(second).value());  }  //  // operator *  //  template<typename STORAGE_TYPE, typename BASE_UNIT, typename DERIVED_UNIT> -DERIVED_UNIT operator * (typename LLUnitType<STORAGE_TYPE, BASE_UNIT, DERIVED_UNIT>::storage_t first, LLUnitType<STORAGE_TYPE, BASE_UNIT, DERIVED_UNIT> second) +DERIVED_UNIT operator * (STORAGE_TYPE first, LLUnitType<STORAGE_TYPE, BASE_UNIT, DERIVED_UNIT> second)  {  	return DERIVED_UNIT(first * second.value());  }  template<typename STORAGE_TYPE, typename BASE_UNIT, typename DERIVED_UNIT> -DERIVED_UNIT operator * (LLUnitType<STORAGE_TYPE, BASE_UNIT, DERIVED_UNIT> first, typename LLUnitType<STORAGE_TYPE, BASE_UNIT, DERIVED_UNIT>::storage_t second) +DERIVED_UNIT operator * (LLUnitType<STORAGE_TYPE, BASE_UNIT, DERIVED_UNIT> first, STORAGE_TYPE second)  {  	return DERIVED_UNIT(first.value() * second);  } +  //  // operator /  //  template<typename STORAGE_TYPE, typename BASE_UNIT, typename DERIVED_UNIT> -DERIVED_UNIT operator / (typename LLUnitType<STORAGE_TYPE, BASE_UNIT, DERIVED_UNIT>::storage_t first, LLUnitType<STORAGE_TYPE, BASE_UNIT, DERIVED_UNIT> second) +DERIVED_UNIT operator / (STORAGE_TYPE first, LLUnitTypeWrapper<STORAGE_TYPE, BASE_UNIT, DERIVED_UNIT> second)  { -	return DERIVED_UNIT(first * second.value()); +	return DERIVED_UNIT(first / second.value());  }  template<typename STORAGE_TYPE, typename BASE_UNIT, typename DERIVED_UNIT> -DERIVED_UNIT operator / (LLUnitType<STORAGE_TYPE, BASE_UNIT, DERIVED_UNIT> first, typename LLUnitType<STORAGE_TYPE, BASE_UNIT, DERIVED_UNIT>::storage_t second) +DERIVED_UNIT operator / (LLUnitTypeWrapper<STORAGE_TYPE, BASE_UNIT, DERIVED_UNIT> first, STORAGE_TYPE second)  { -	return DERIVED_UNIT(first.value() * second); +	return DERIVED_UNIT(first.value() / second);  }  //  // operator <  // -template<typename STORAGE_TYPE, typename BASE_UNIT, typename DERIVED_UNIT> +template<typename STORAGE_TYPE, typename BASE_UNIT, typename DERIVED_UNIT, typename STORAGE_TYPE2, typename BASE_UNIT2, typename DERIVED_UNIT2> +  bool operator < (typename LLUnitType<STORAGE_TYPE, BASE_UNIT, DERIVED_UNIT>::storage_t first, LLUnitType<STORAGE_TYPE, BASE_UNIT, DERIVED_UNIT> second)  {  	return first < second.value();  } -template<typename STORAGE_TYPE, typename BASE_UNIT, typename DERIVED_UNIT> -bool operator < (LLUnitType<STORAGE_TYPE, BASE_UNIT, DERIVED_UNIT> first, typename LLUnitType<STORAGE_TYPE, BASE_UNIT, DERIVED_UNIT>::storage_t second) -{ -	return first.value() < second; -} - -template<typename STORAGE_TYPE, typename BASE_UNIT, typename DERIVED_UNIT, typename OTHER_DERIVED_UNIT> -bool operator < (LLUnitType<STORAGE_TYPE, BASE_UNIT, DERIVED_UNIT> first, LLUnitType<STORAGE_TYPE, BASE_UNIT, OTHER_DERIVED_UNIT> second) -{ -	return first.value() < second.value(); -} -  //  // operator <=  // @@ -252,17 +239,6 @@ bool operator <= (typename LLUnitType<STORAGE_TYPE, BASE_UNIT, DERIVED_UNIT>::st  	return first <= second.value();  } -template<typename STORAGE_TYPE, typename BASE_UNIT, typename DERIVED_UNIT> -bool operator <= (LLUnitType<STORAGE_TYPE, BASE_UNIT, DERIVED_UNIT> first, typename LLUnitType<STORAGE_TYPE, BASE_UNIT, DERIVED_UNIT>::storage_t second) -{ -	return first.value() <= second; -} - -template<typename STORAGE_TYPE, typename BASE_UNIT, typename DERIVED_UNIT, typename OTHER_DERIVED_UNIT> -bool operator <= (LLUnitType<STORAGE_TYPE, BASE_UNIT, DERIVED_UNIT> first, LLUnitType<STORAGE_TYPE, BASE_UNIT, OTHER_DERIVED_UNIT> second) -{ -	return first.value() <= second.value(); -}  //  // operator > @@ -273,17 +249,6 @@ bool operator > (typename LLUnitType<STORAGE_TYPE, BASE_UNIT, DERIVED_UNIT>::sto  	return first > second.value();  } -template<typename STORAGE_TYPE, typename BASE_UNIT, typename DERIVED_UNIT> -bool operator > (LLUnitType<STORAGE_TYPE, BASE_UNIT, DERIVED_UNIT> first, typename LLUnitType<STORAGE_TYPE, BASE_UNIT, DERIVED_UNIT>::storage_t second) -{ -	return first.value() > second; -} - -template<typename STORAGE_TYPE, typename BASE_UNIT, typename DERIVED_UNIT, typename OTHER_DERIVED_UNIT> -bool operator > (LLUnitType<STORAGE_TYPE, BASE_UNIT, DERIVED_UNIT> first, LLUnitType<STORAGE_TYPE, BASE_UNIT, OTHER_DERIVED_UNIT> second) -{ -	return first.value() > second.value(); -}  //  // operator >=  // @@ -293,18 +258,6 @@ bool operator >= (typename LLUnitType<STORAGE_TYPE, BASE_UNIT, DERIVED_UNIT>::st  	return first >= second.value();  } -template<typename STORAGE_TYPE, typename BASE_UNIT, typename DERIVED_UNIT> -bool operator >= (LLUnitType<STORAGE_TYPE, BASE_UNIT, DERIVED_UNIT> first, typename LLUnitType<STORAGE_TYPE, BASE_UNIT, DERIVED_UNIT>::storage_t second) -{ -	return first.value() >= second; -} - -template<typename STORAGE_TYPE, typename BASE_UNIT, typename DERIVED_UNIT, typename OTHER_DERIVED_UNIT> -bool operator >= (LLUnitType<STORAGE_TYPE, BASE_UNIT, DERIVED_UNIT> first, LLUnitType<STORAGE_TYPE, BASE_UNIT, OTHER_DERIVED_UNIT> second) -{ -	return first.value() >= second.value(); -} -  //  // operator ==  // @@ -314,18 +267,6 @@ bool operator == (typename LLUnitType<STORAGE_TYPE, BASE_UNIT, DERIVED_UNIT>::st  	return first == second.value();  } -template<typename STORAGE_TYPE, typename BASE_UNIT, typename DERIVED_UNIT> -bool operator == (LLUnitType<STORAGE_TYPE, BASE_UNIT, DERIVED_UNIT> first, typename LLUnitType<STORAGE_TYPE, BASE_UNIT, DERIVED_UNIT>::storage_t second) -{ -	return first.value() == second; -} - -template<typename STORAGE_TYPE, typename BASE_UNIT, typename DERIVED_UNIT, typename OTHER_DERIVED_UNIT> -bool operator == (LLUnitType<STORAGE_TYPE, BASE_UNIT, DERIVED_UNIT> first, LLUnitType<STORAGE_TYPE, BASE_UNIT, OTHER_DERIVED_UNIT> second) -{ -	return first.value() == second.value(); -} -  //  // operator !=  // @@ -335,18 +276,6 @@ bool operator != (typename LLUnitType<STORAGE_TYPE, BASE_UNIT, DERIVED_UNIT>::st  	return first != second.value();  } -template<typename STORAGE_TYPE, typename BASE_UNIT, typename DERIVED_UNIT> -bool operator != (LLUnitType<STORAGE_TYPE, BASE_UNIT, DERIVED_UNIT> first, typename LLUnitType<STORAGE_TYPE, BASE_UNIT, DERIVED_UNIT>::storage_t second) -{ -	return first.value() != second; -} - -template<typename STORAGE_TYPE, typename BASE_UNIT, typename DERIVED_UNIT, typename OTHER_DERIVED_UNIT> -bool operator != (LLUnitType<STORAGE_TYPE, BASE_UNIT, DERIVED_UNIT> first, LLUnitType<STORAGE_TYPE, BASE_UNIT, OTHER_DERIVED_UNIT> second) -{ -	return first.value() != second.value(); -} -  #define LL_DECLARE_BASE_UNIT(unit_name)                                                                          \  	template<typename STORAGE>                                                                                   \  	struct unit_name : public LLUnitType<STORAGE, unit_name<STORAGE>, unit_name<STORAGE> >						 \ diff --git a/indra/llmath/v4color.h b/indra/llmath/v4color.h index b047f86e6e..78223e1e65 100644 --- a/indra/llmath/v4color.h +++ b/indra/llmath/v4color.h @@ -49,9 +49,9 @@ class LLColor4  		LLColor4();						// Initializes LLColor4 to (0, 0, 0, 1)  		LLColor4(F32 r, F32 g, F32 b);		// Initializes LLColor4 to (r, g, b, 1)  		LLColor4(F32 r, F32 g, F32 b, F32 a);		// Initializes LLColor4 to (r. g, b, a) -		LLColor4(U32 clr);							// Initializes LLColor4 to (r=clr>>24, etc)) -		LLColor4(const F32 *vec);			// Initializes LLColor4 to (vec[0]. vec[1], vec[2], 1) -		LLColor4(const LLColor3 &vec, F32 a = 1.f);	// Initializes LLColor4 to (vec, a) +		explicit LLColor4(U32 clr);							// Initializes LLColor4 to (r=clr>>24, etc)) +		explicit LLColor4(const F32 *vec);			// Initializes LLColor4 to (vec[0]. vec[1], vec[2], 1) +		explicit LLColor4(const LLColor3 &vec, F32 a = 1.f);	// Initializes LLColor4 to (vec, a)  		explicit LLColor4(const LLSD& sd);  		explicit LLColor4(const LLColor4U& color4u);  // "explicit" to avoid automatic conversion  		explicit LLColor4(const LLVector4& vector4);  // "explicit" to avoid automatic conversion diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp index 629eef2c3b..118c74b9b2 100644 --- a/indra/llui/llnotifications.cpp +++ b/indra/llui/llnotifications.cpp @@ -464,7 +464,7 @@ LLNotification::LLNotification(const LLNotification::Params& p) :  	mTimestamp(p.time_stamp),   	mSubstitutions(p.substitutions),  	mPayload(p.payload), -	mExpiresAt(0), +	mExpiresAt(0.0),  	mTemporaryResponder(false),  	mRespondedTo(false),  	mPriority(p.priority), diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index f64134b8b7..ceb8d3155c 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -533,7 +533,7 @@ void LLViewerTexture::updateClass(const F32 velocity, const F32 angular_velocity  		sTotalTextureMemory >= sMaxTotalTextureMem)  	{  		//when texture memory overflows, lower down the threashold to release the textures more aggressively. -		sMaxDesiredTextureMem = llmin(sMaxDesiredTextureMem * 0.75f, (LLUnit::Bytes<S32>)gMaxVideoRam) ;//512 MB +		sMaxDesiredTextureMem = llmin(sMaxDesiredTextureMem * 0.75f, LLUnit::Bytes<S32>(gMaxVideoRam));  		// If we are using more texture memory than we should,  		// scale up the desired discard level @@ -3312,7 +3312,7 @@ void LLViewerLODTexture::processTextureStats()  				scaleDown() ;  			}  			// Only allow GL to have 2x the video card memory -			else if ( sTotalTextureMemory > sMaxTotalTextureMem*texmem_middle_bound_scale && +			else if ( sTotalTextureMemory > sMaxTotalTextureMem * texmem_middle_bound_scale &&  				(!getBoundRecently() || mDesiredDiscardLevel >= mCachedRawDiscardLevel))  			{  				scaleDown() ;  | 
