diff options
| -rw-r--r-- | indra/llcommon/llpreprocessor.h | 1 | ||||
| -rw-r--r-- | indra/llcommon/llstringtable.h | 3 | ||||
| -rw-r--r-- | indra/llcommon/u64.cpp | 2 | ||||
| -rw-r--r-- | indra/llprimitive/llprimitive.cpp | 2 | ||||
| -rw-r--r-- | indra/llui/llsliderctrl.cpp | 2 | ||||
| -rw-r--r-- | indra/llui/llspinctrl.cpp | 2 | ||||
| -rw-r--r-- | indra/newview/llurlwhitelist.cpp | 24 | ||||
| -rw-r--r-- | indra/newview/llurlwhitelist.h | 7 | ||||
| -rw-r--r-- | indra/win_updater/updater.cpp | 2 | 
9 files changed, 19 insertions, 26 deletions
| diff --git a/indra/llcommon/llpreprocessor.h b/indra/llcommon/llpreprocessor.h index f4e24025d5..8fa171c482 100644 --- a/indra/llcommon/llpreprocessor.h +++ b/indra/llcommon/llpreprocessor.h @@ -93,6 +93,7 @@  #pragma warning( disable : 4284 )	// silly MS warning deep inside their <map> include file  #pragma warning( disable : 4503 )	// 'decorated name length exceeded, name was truncated'. Does not seem to affect compilation.  #pragma warning( disable : 4800 )	// 'BOOL' : forcing value to bool 'true' or 'false' (performance warning) +#pragma warning( disable : 4996 )	// warning: deprecated  #endif	//	LL_WINDOWS  #endif	//	not LL_LINDEN_PREPROCESSOR_H diff --git a/indra/llcommon/llstringtable.h b/indra/llcommon/llstringtable.h index 20db115c6e..f293045119 100644 --- a/indra/llcommon/llstringtable.h +++ b/indra/llcommon/llstringtable.h @@ -17,9 +17,8 @@  #include <set>  #if LL_WINDOWS -# if (_MSC_VER >= 1300) +# if (_MSC_VER >= 1300 && _MSC_VER < 1400)  #  define STRING_TABLE_HASH_MAP 1 -#  pragma warning(disable : 4996)  # endif  #else  //# define STRING_TABLE_HASH_MAP 1 diff --git a/indra/llcommon/u64.cpp b/indra/llcommon/u64.cpp index 7f0323aaad..b942322773 100644 --- a/indra/llcommon/u64.cpp +++ b/indra/llcommon/u64.cpp @@ -14,7 +14,7 @@  U64 str_to_U64(const char *str)  {  	U64 result = 0; -	char *aptr = strpbrk(str,"0123456789"); +	const char *aptr = strpbrk(str,"0123456789");  	if (!aptr)  	{ diff --git a/indra/llprimitive/llprimitive.cpp b/indra/llprimitive/llprimitive.cpp index 1b96ac16d4..058c3b5d65 100644 --- a/indra/llprimitive/llprimitive.cpp +++ b/indra/llprimitive/llprimitive.cpp @@ -1178,7 +1178,7 @@ S32 LLPrimitive::packTEField(U8 *cur_ptr, U8 *data_ptr, U8 data_size, U8 last_fa  			{   				if (!memcmp(data_ptr+(data_size *face_index), data_ptr+(data_size *i), data_size))  				{ -					exception_faces |= (1 << i);  +					exception_faces |= ((U64)1 << i);   				}  			} diff --git a/indra/llui/llsliderctrl.cpp b/indra/llui/llsliderctrl.cpp index 6c740aa39e..3079726434 100644 --- a/indra/llui/llsliderctrl.cpp +++ b/indra/llui/llsliderctrl.cpp @@ -196,7 +196,7 @@ void LLSliderCtrl::updateText()  		LLLocale locale(LLLocale::USER_LOCALE);  		// Don't display very small negative values as -0.000 -		F32 displayed_value = (F32)(floor(getValueF32() * pow(10, mPrecision) + 0.5) / pow(10, mPrecision)); +		F32 displayed_value = (F32)(floor(getValueF32() * pow(10.0, (F64)mPrecision) + 0.5) / pow(10.0, (F64)mPrecision));  		LLString format = llformat("%%.%df", mPrecision);  		LLString text = llformat(format.c_str(), displayed_value); diff --git a/indra/llui/llspinctrl.cpp b/indra/llui/llspinctrl.cpp index 332372011e..4c1700175b 100644 --- a/indra/llui/llspinctrl.cpp +++ b/indra/llui/llspinctrl.cpp @@ -229,7 +229,7 @@ void LLSpinCtrl::updateEditor()  	LLLocale locale(LLLocale::USER_LOCALE);  	// Don't display very small negative values as -0.000 -	F32 displayed_value = (F32)floor(getValue().asReal() * pow(10, mPrecision) + 0.5) / (F32)pow(10, mPrecision); +	F32 displayed_value = (F32)floor(getValue().asReal() * pow(10.0, (F64)mPrecision) + 0.5) / (F32)pow(10.0, (F64)mPrecision);  //	if( S32( displayed_value * pow( 10, mPrecision ) ) == 0 )  //	{ diff --git a/indra/newview/llurlwhitelist.cpp b/indra/newview/llurlwhitelist.cpp index 65f7229abf..b5c704f554 100644 --- a/indra/newview/llurlwhitelist.cpp +++ b/indra/newview/llurlwhitelist.cpp @@ -21,7 +21,7 @@ LLUrlWhiteList::LLUrlWhiteList () :  	mLoaded ( false ),  	mFilename ( "url_whitelist.ini" ),  	mUrlList ( 0 ), -	mUrlListIter ( 0 ) +	mCurIndex ( 0 )  {  } @@ -102,10 +102,10 @@ bool LLUrlWhiteList::save ()  	if ( file.is_open () )  	{  		// for each entry we have -		for ( LLStringListIter iter = mUrlList.begin (); iter != mUrlList.end (); ++iter ) +		for ( string_list_t::iterator iter = mUrlList.begin (); iter != mUrlList.end (); ++iter )  		{  			file << ( *iter ) << std::endl; -		}; +		}  		file.close (); @@ -121,8 +121,7 @@ bool LLUrlWhiteList::clear ()  {  	mUrlList.clear (); -	// invalidate iterator since we changed the contents  -	mUrlListIter = mUrlList.end (); +	mCurIndex = 0;  	return true;  } @@ -156,7 +155,7 @@ bool LLUrlWhiteList::addItem ( const LLString& itemIn, bool saveAfterAdd )  {  	LLString item = url_cleanup(itemIn); -	mUrlList.insert ( mUrlList.end (), item ); +	mUrlList.push_back ( item );  	// use this when all you want to do is call addItem ( ... ) where necessary  	if ( saveAfterAdd ) @@ -172,11 +171,8 @@ bool LLUrlWhiteList::getFirst ( LLString& valueOut )  	if ( mUrlList.size () == 0 )  		return false; -	mUrlListIter = mUrlList.begin (); - -	valueOut = * ( mUrlListIter ); - -	++mUrlListIter; +	mCurIndex = 0; +	valueOut = mUrlList[mCurIndex++];  	return true;	  } @@ -185,12 +181,10 @@ bool LLUrlWhiteList::getFirst ( LLString& valueOut )  //  bool LLUrlWhiteList::getNext ( LLString& valueOut )  { -	if ( mUrlListIter == mUrlList.end () ) +	if ( mCurIndex >= mUrlList.size () )  		return false; -	valueOut = * ( mUrlListIter ); - -	++mUrlListIter; +	valueOut = mUrlList[mCurIndex++];  	return true;  } diff --git a/indra/newview/llurlwhitelist.h b/indra/newview/llurlwhitelist.h index e0d1f64ddb..43233eca3b 100644 --- a/indra/newview/llurlwhitelist.h +++ b/indra/newview/llurlwhitelist.h @@ -36,13 +36,12 @@ class LLUrlWhiteList  		LLUrlWhiteList ();  		static LLUrlWhiteList* sInstance; -		typedef std::list < LLString > LLStringList; -		typedef std::list < LLString >::iterator LLStringListIter; +		typedef std::vector < LLString > string_list_t ;  		bool mLoaded;  		const LLString mFilename; -		LLStringList mUrlList; -		LLStringListIter mUrlListIter; +		string_list_t mUrlList; +		U32 mCurIndex;  };  #endif  // LL_LLURLWHITELIST_H diff --git a/indra/win_updater/updater.cpp b/indra/win_updater/updater.cpp index ea4e8ced5c..11ccb559c6 100644 --- a/indra/win_updater/updater.cpp +++ b/indra/win_updater/updater.cpp @@ -114,7 +114,7 @@ int WINAPI get_url_into_file(WCHAR *uri, char *path, int *cancelled)  	{  #if _DEBUG  		DWORD err = GetLastError(); -		fprintf(logfile,"InternetQueryDataAvailable Failed: %d bytes\n",total_bytes); +		fprintf(logfile,"InternetQueryDataAvailable Failed: %d bytes Err:%d\n",total_bytes,err);  		fflush(logfile);  #endif	   		return success; | 
