diff options
Diffstat (limited to 'indra/newview')
| -rw-r--r-- | indra/newview/llavatarlistitem.cpp | 3 | ||||
| -rw-r--r-- | indra/newview/llfolderview.h | 2 | ||||
| -rw-r--r-- | indra/newview/llfolderviewitem.cpp | 16 | ||||
| -rw-r--r-- | indra/newview/llfolderviewitem.h | 18 | ||||
| -rw-r--r-- | indra/newview/lltooldraganddrop.cpp | 10 | ||||
| -rw-r--r-- | indra/newview/llvocache.cpp | 65 | ||||
| -rw-r--r-- | indra/newview/tests/lllogininstance_test.cpp | 2 | 
7 files changed, 61 insertions, 55 deletions
diff --git a/indra/newview/llavatarlistitem.cpp b/indra/newview/llavatarlistitem.cpp index 8fc4ad6763..9f7699b3db 100644 --- a/indra/newview/llavatarlistitem.cpp +++ b/indra/newview/llavatarlistitem.cpp @@ -70,7 +70,8 @@ LLAvatarListItem::LLAvatarListItem(bool not_from_ui_factory/* = true*/)  	mOnlineStatus(E_UNKNOWN),  	mShowInfoBtn(true),  	mShowProfileBtn(true), -	mShowPermissions(false) +	mShowPermissions(false), +	mHovered(false)  {  	if (not_from_ui_factory)  	{ diff --git a/indra/newview/llfolderview.h b/indra/newview/llfolderview.h index f9c48c3ca7..66ab4ce5eb 100644 --- a/indra/newview/llfolderview.h +++ b/indra/newview/llfolderview.h @@ -150,7 +150,7 @@ public:  	void setSelectionByID(const LLUUID& obj_id, BOOL take_keyboard_focus);  	// Called once a frame to update the selection if mSelectThisID has been set -	void updateSelection();  +	void updateSelection();  	// This method is used to toggle the selection of an item. Walks  	// children, and keeps track of selected objects. diff --git a/indra/newview/llfolderviewitem.cpp b/indra/newview/llfolderviewitem.cpp index 316f78d1e2..3c36248c1f 100644 --- a/indra/newview/llfolderviewitem.cpp +++ b/indra/newview/llfolderviewitem.cpp @@ -528,9 +528,9 @@ BOOL LLFolderViewItem::changeSelection(LLFolderViewItem* selection, BOOL selecte  void LLFolderViewItem::deselectItem(void)  {  	llassert(mIsSelected); -     +  	mIsSelected = FALSE; -     +  	// Update ancestors' count of selected descendents.  	LLFolderViewFolder* parent_folder = getParentFolder();  	if (parent_folder) @@ -542,9 +542,9 @@ void LLFolderViewItem::deselectItem(void)  void LLFolderViewItem::selectItem(void)  {  	llassert(!mIsSelected); -     +  	mIsSelected = TRUE; -     +  	// Update ancestors' count of selected descendents.  	LLFolderViewFolder* parent_folder = getParentFolder();  	if (parent_folder) @@ -1107,7 +1107,7 @@ void LLFolderViewItem::draw()  LLFolderViewFolder::LLFolderViewFolder( const LLFolderViewItem::Params& p ):   	LLFolderViewItem( p ),	// 0 = no create time -    mNumDescendantsSelected(0), +	mNumDescendantsSelected(0),  	mIsOpen(FALSE),  	mExpanderHighlighted(FALSE),  	mCurHeight(0.f), @@ -1499,10 +1499,10 @@ void LLFolderViewFolder::recursiveIncrementNumDescendantsSelected(S32 increment)  	do  	{  		parent_folder->mNumDescendantsSelected += increment; -         +  		// Make sure we don't have negative values.  		llassert(parent_folder->mNumDescendantsSelected >= 0); -         +  		parent_folder = parent_folder->getParentFolder();  	}  	while(parent_folder); @@ -1511,7 +1511,7 @@ void LLFolderViewFolder::recursiveIncrementNumDescendantsSelected(S32 increment)  // Passes selection information on to children and record selection  // information if necessary.  BOOL LLFolderViewFolder::setSelection(LLFolderViewItem* selection, BOOL openitem, -									  BOOL take_keyboard_focus) +                                      BOOL take_keyboard_focus)  {  	BOOL rv = FALSE;  	if (selection == this) diff --git a/indra/newview/llfolderviewitem.h b/indra/newview/llfolderviewitem.h index 9e819aaaaa..ab9317afd9 100644 --- a/indra/newview/llfolderviewitem.h +++ b/indra/newview/llfolderviewitem.h @@ -108,7 +108,7 @@ public:  	// layout constants  	static const S32 LEFT_PAD = 5; -    // LEFT_INDENTATION is set via folder_indentation above +	// LEFT_INDENTATION is set via folder_indentation above  	static const S32 ICON_PAD = 2;  	static const S32 ICON_WIDTH = 16;  	static const S32 TEXT_PAD = 1; @@ -217,21 +217,21 @@ public:  	// If 'selection' is 'this' then note that otherwise ignore.  	// Returns TRUE if this item ends up being selected.  	virtual BOOL setSelection(LLFolderViewItem* selection, BOOL openitem, BOOL take_keyboard_focus); -     +  	// This method is used to set the selection state of an item.  	// If 'selection' is 'this' then note selection.  	// Returns TRUE if the selection state of this item was changed.  	virtual BOOL changeSelection(LLFolderViewItem* selection, BOOL selected); -     +  	// this method is used to group select items  	virtual void extendSelection(LLFolderViewItem* selection, LLFolderViewItem* last_selected, LLDynamicArray<LLFolderViewItem*>& items) { } -     +  	// this method is used to deselect this element  	void deselectItem(); -     +  	// this method is used to select this element  	void selectItem(); -     +  	// gets multiple-element selection  	virtual std::set<LLUUID> getSelectionList() const; @@ -253,7 +253,7 @@ public:  	BOOL getIsCurSelection() { return mIsCurSelection; }  	BOOL hasVisibleChildren() { return mHasVisibleChildren; } -	 +  	void setShowLoadStatus(bool status) { mShowLoadStatus = status; }  	// Call through to the viewed object and return true if it can be @@ -437,13 +437,13 @@ public:  	// Returns TRUE if this object (or a child) ends up being selected.  	// If 'openitem' is TRUE then folders are opened up along the way to the selection.  	virtual BOOL setSelection(LLFolderViewItem* selection, BOOL openitem, BOOL take_keyboard_focus); -     +  	// This method is used to change the selection of an item.  	// Recursively traverse all children; if 'selection' is 'this' then change  	// the select status if necessary.  	// Returns TRUE if the selection state of this folder, or of a child, was changed.  	virtual BOOL changeSelection(LLFolderViewItem* selection, BOOL selected); -     +  	// this method is used to group select items  	virtual void extendSelection(LLFolderViewItem* selection, LLFolderViewItem* last_selected, LLDynamicArray<LLFolderViewItem*>& items); diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp index d6e069b3dc..6bb95168e2 100644 --- a/indra/newview/lltooldraganddrop.cpp +++ b/indra/newview/lltooldraganddrop.cpp @@ -1446,10 +1446,10 @@ static void give_inventory_cb(const LLSD& notification, const LLSD& response)  }  static void show_item_sharing_confirmation(const std::string name, -										   LLViewerInventoryItem* inv_item, -										   const LLSD& dest, -										   const LLUUID& dest_agent, -										   const LLUUID& session_id = LLUUID::null) +					   LLViewerInventoryItem* inv_item, +					   const LLSD& dest, +					   const LLUUID& dest_agent, +					   const LLUUID& session_id = LLUUID::null)  {  	if (!inv_item)  	{ @@ -1459,7 +1459,7 @@ static void show_item_sharing_confirmation(const std::string name,  	LLSD substitutions;  	substitutions["RESIDENTS"] = name; -	substitutions["ITEMS"] = inv_item ? inv_item->getName() : LLStringUtil::null; +	substitutions["ITEMS"] = inv_item->getName();  	LLSD payload;  	payload["agent_id"] = dest_agent;  	payload["item_id"] = inv_item->getUUID(); diff --git a/indra/newview/llvocache.cpp b/indra/newview/llvocache.cpp index 0b903e62b1..8bdb8e069e 100644 --- a/indra/newview/llvocache.cpp +++ b/indra/newview/llvocache.cpp @@ -44,25 +44,27 @@ BOOL check_write(LLAPRFile* apr_file, void* src, S32 n_bytes)  //---------------------------------------------------------------------------  LLVOCacheEntry::LLVOCacheEntry(U32 local_id, U32 crc, LLDataPackerBinaryBuffer &dp) +	: +	mLocalID(local_id), +	mCRC(crc), +	mHitCount(0), +	mDupeCount(0), +	mCRCChangeCount(0)  { -	mLocalID = local_id; -	mCRC = crc; -	mHitCount = 0; -	mDupeCount = 0; -	mCRCChangeCount = 0;  	mBuffer = new U8[dp.getBufferSize()];  	mDP.assignBuffer(mBuffer, dp.getBufferSize());  	mDP = dp;  }  LLVOCacheEntry::LLVOCacheEntry() +	: +	mLocalID(0), +	mCRC(0), +	mHitCount(0), +	mDupeCount(0), +	mCRCChangeCount(0), +	mBuffer(NULL)  { -	mLocalID = 0; -	mCRC = 0; -	mHitCount = 0; -	mDupeCount = 0; -	mCRCChangeCount = 0; -	mBuffer = NULL;  	mDP.assignBuffer(mBuffer, 0);  } @@ -73,7 +75,7 @@ LLVOCacheEntry::LLVOCacheEntry(LLAPRFile* apr_file)  	success = check_read(apr_file, &mLocalID, sizeof(U32));  	if(success) -{ +	{  		success = check_read(apr_file, &mCRC, sizeof(U32));  	}  	if(success) @@ -83,27 +85,24 @@ LLVOCacheEntry::LLVOCacheEntry(LLAPRFile* apr_file)  	if(success)  	{  		success = check_read(apr_file, &mDupeCount, sizeof(S32)); -} +	}  	if(success) -{ +	{  		success = check_read(apr_file, &mCRCChangeCount, sizeof(S32));  	}  	if(success)  	{  		success = check_read(apr_file, &size, sizeof(S32)); -	// Corruption in the cache entries -	if ((size > 10000) || (size < 1)) -	{ -		// We've got a bogus size, skip reading it. -		// We won't bother seeking, because the rest of this file -		// is likely bogus, and will be tossed anyway. -		llwarns << "Bogus cache entry, size " << size << ", aborting!" << llendl; -		mLocalID = 0; -		mCRC = 0; -		mBuffer = NULL; -		return; -	} +		// Corruption in the cache entries +		if ((size > 10000) || (size < 1)) +		{ +			// We've got a bogus size, skip reading it. +			// We won't bother seeking, because the rest of this file +			// is likely bogus, and will be tossed anyway. +			llwarns << "Bogus cache entry, size " << size << ", aborting!" << llendl; +			success = FALSE; +		}  	}  	if(success && size > 0)  	{ @@ -112,8 +111,8 @@ LLVOCacheEntry::LLVOCacheEntry(LLAPRFile* apr_file)  		if(success)  		{ -	mDP.assignBuffer(mBuffer, size); -} +			mDP.assignBuffer(mBuffer, size); +		}  		else  		{  			delete[] mBuffer ; @@ -125,6 +124,9 @@ LLVOCacheEntry::LLVOCacheEntry(LLAPRFile* apr_file)  	{  		mLocalID = 0;  		mCRC = 0; +		mHitCount = 0; +		mDupeCount = 0; +		mCRCChangeCount = 0;  		mBuffer = NULL;  	}  } @@ -257,7 +259,8 @@ void LLVOCache::destroyClass()  LLVOCache::LLVOCache():  	mInitialized(FALSE),  	mReadOnly(TRUE), -	mNumEntries(0) +	mNumEntries(0), +	mCacheSize(1)  {  	mLocalAPRFilePoolp = new LLVolatileAPRPool() ;  } @@ -289,8 +292,8 @@ void LLVOCache::initCache(ELLPath location, U32 size, U32 cache_version)  	{  		LLFile::mkdir(mObjectCacheDirName);  	}	 -	mCacheSize = llmin(size, MAX_NUM_OBJECT_ENTRIES) ; -	mCacheSize = llmax(mCacheSize, NUM_ENTRIES_TO_PURGE); +	mCacheSize = llclamp(size, +			     MAX_NUM_OBJECT_ENTRIES, NUM_ENTRIES_TO_PURGE);  	mMetaInfo.mVersion = cache_version;  	readCacheHeader(); diff --git a/indra/newview/tests/lllogininstance_test.cpp b/indra/newview/tests/lllogininstance_test.cpp index 55823fc386..712f9a197e 100644 --- a/indra/newview/tests/lllogininstance_test.cpp +++ b/indra/newview/tests/lllogininstance_test.cpp @@ -107,6 +107,8 @@ void LLGridManager::addGrid(LLSD& grid_data)  {  }  LLGridManager::LLGridManager() +: +	mIsInProductionGrid(false)  {	  }  | 
