From 72520f515f8bc77655dd733e1d2f487ca610edec Mon Sep 17 00:00:00 2001 From: "brettw%gmail.com" Date: Thu, 26 Jan 2006 20:45:41 +0000 Subject: [PATCH] Port Ben's VC6 compiler bustage fixes to trunk. --- browser/components/places/src/nsNavHistory.cpp | 5 +++-- .../components/places/src/nsNavHistoryResult.cpp | 14 +++++++------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/browser/components/places/src/nsNavHistory.cpp b/browser/components/places/src/nsNavHistory.cpp index cc556de3bd7c..c51a9396dddd 100644 --- a/browser/components/places/src/nsNavHistory.cpp +++ b/browser/components/places/src/nsNavHistory.cpp @@ -1200,7 +1200,8 @@ nsNavHistory::GetUpdateRequirements(const nsCOMArray& aQuerie // first check if there are search terms *aHasSearchTerms = PR_FALSE; - for (PRInt32 i = 0; i < aQueries.Count(); i ++) { + PRInt32 i; + for (i = 0; i < aQueries.Count(); i ++) { aQueries[i]->GetHasSearchTerms(aHasSearchTerms); if (*aHasSearchTerms) break; @@ -1213,7 +1214,7 @@ nsNavHistory::GetUpdateRequirements(const nsCOMArray& aQuerie return QUERYUPDATE_COMPLEX; PRBool nonTimeBasedItems = PR_FALSE; - for (PRInt32 i = 0; i < aQueries.Count(); i ++) { + for (i = 0; i < aQueries.Count(); i ++) { nsNavHistoryQuery* query = aQueries[i]; if (query->Folders().Length() > 0 || query->OnlyBookmarked()) { diff --git a/browser/components/places/src/nsNavHistoryResult.cpp b/browser/components/places/src/nsNavHistoryResult.cpp index 42f9c6ceab1a..23394377bce2 100755 --- a/browser/components/places/src/nsNavHistoryResult.cpp +++ b/browser/components/places/src/nsNavHistoryResult.cpp @@ -1135,8 +1135,8 @@ nsNavHistoryContainerResultNode::RemoveChildAt(PRInt32 aIndex, PRBool nsNavHistoryContainerResultNode::CanRemoteContainersChange() { - return (mContainerType != nsINavHistoryResultNode::RESULT_TYPE_FOLDER && - mContainerType != nsINavHistoryResultNode::RESULT_TYPE_QUERY); + return (mContainerType != nsNavHistoryResultNode::RESULT_TYPE_FOLDER && + mContainerType != nsNavHistoryResultNode::RESULT_TYPE_QUERY); } @@ -1295,10 +1295,10 @@ nsNavHistoryContainerResultNode::AppendContainerNode( if (! IsTypeContainer(aContainerType) || IsTypeFolder(aContainerType) || IsTypeQuery(aContainerType)) return NS_ERROR_INVALID_ARG; // not proper container type - if (aContainerType == nsINavHistoryResultNode::RESULT_TYPE_REMOTE_CONTAINER && + if (aContainerType == nsNavHistoryResultNode::RESULT_TYPE_REMOTE_CONTAINER && aRemoteContainerType.IsEmpty()) return NS_ERROR_INVALID_ARG; // remote containers must have r.c. type - if (aContainerType != nsINavHistoryResultNode::RESULT_TYPE_REMOTE_CONTAINER && + if (aContainerType != nsNavHistoryResultNode::RESULT_TYPE_REMOTE_CONTAINER && ! aRemoteContainerType.IsEmpty()) return NS_ERROR_INVALID_ARG; // non-remote containers must NOT have r.c. type @@ -1417,7 +1417,7 @@ nsNavHistoryQueryResultNode::nsNavHistoryQueryResultNode( const nsACString& aTitle, const nsACString& aIconURI, const nsACString& aQueryURI) : nsNavHistoryContainerResultNode(aTitle, aIconURI, - nsINavHistoryResultNode::RESULT_TYPE_QUERY, + nsNavHistoryResultNode::RESULT_TYPE_QUERY, PR_TRUE, EmptyCString()), mQueryURI(aQueryURI), mHasSearchTerms(PR_FALSE), @@ -1434,7 +1434,7 @@ nsNavHistoryQueryResultNode::nsNavHistoryQueryResultNode( const nsCOMArray& aQueries, nsNavHistoryQueryOptions* aOptions) : nsNavHistoryContainerResultNode(aTitle, aIconURI, - nsINavHistoryResultNode::RESULT_TYPE_QUERY, + nsNavHistoryResultNode::RESULT_TYPE_QUERY, PR_TRUE, EmptyCString()), mQueries(aQueries), mOptions(aOptions), @@ -2308,7 +2308,7 @@ nsNavHistoryFolderResultNode::nsNavHistoryFolderResultNode( const nsACString& aTitle, nsNavHistoryQueryOptions* aOptions, PRInt64 aFolderId, const nsACString& aRemoteContainerType) : nsNavHistoryContainerResultNode(aTitle, EmptyCString(), - nsINavHistoryResultNode::RESULT_TYPE_FOLDER, + nsNavHistoryResultNode::RESULT_TYPE_FOLDER, PR_FALSE, aRemoteContainerType), mContentsValid(PR_FALSE), mOptions(aOptions),