Bug 821901 - Fix build warnings in /toolkit/components/places/nsNavHistoryResult.cpp. r=mak

This commit is contained in:
Iordache Catalin 2012-12-17 17:43:45 -05:00
parent 879247bc7e
commit 303c331b16

View File

@ -880,7 +880,7 @@ bool
nsNavHistoryContainerResultNode::DoesChildNeedResorting(uint32_t aIndex,
SortComparator aComparator, const char* aData)
{
NS_ASSERTION(aIndex >= 0 && aIndex < uint32_t(mChildren.Count()),
NS_ASSERTION(aIndex < uint32_t(mChildren.Count()),
"Input index out of range");
if (mChildren.Count() == 1)
return false;
@ -1626,8 +1626,9 @@ nsNavHistoryContainerResultNode::RemoveChildAt(int32_t aIndex,
uint32_t oldAccessCount = 0;
if (!aIsTemporary) {
oldAccessCount = mAccessCount;
NS_ASSERTION(mAccessCount >= mChildren[aIndex]->mAccessCount,
"Invalid access count while updating!");
mAccessCount -= mChildren[aIndex]->mAccessCount;
NS_ASSERTION(mAccessCount >= 0, "Invalid access count while updating!");
}
// Remove it from our list and notify the result's observers.
@ -4024,8 +4025,7 @@ nsNavHistoryFolderResultNode::OnItemMoved(int64_t aItemId,
NS_NOTREACHED("Can't find folder that is moving!");
return NS_ERROR_FAILURE;
}
NS_ASSERTION(index >= 0 && index < uint32_t(mChildren.Count()),
"Invalid index!");
NS_ASSERTION(index < uint32_t(mChildren.Count()), "Invalid index!");
node->mBookmarkIndex = aNewIndex;
// adjust position