fix horrible cast in find folders with flag

This commit is contained in:
bienvenu%netscape.com 1999-07-03 21:25:49 +00:00
Родитель 83fe3850e2
Коммит a6d82e97d9
1 изменённых файлов: 5 добавлений и 3 удалений

Просмотреть файл

@ -912,9 +912,11 @@ NS_IMETHODIMP nsMsgFolder::GetFoldersWithFlag(PRUint32 flags, nsIMsgFolder **res
PRUint32 cnt; PRUint32 cnt;
rv = mSubFolders->Count(&cnt); rv = mSubFolders->Count(&cnt);
if (NS_SUCCEEDED(rv)) { if (NS_SUCCEEDED(rv)) {
for (PRUint32 i=0; i < cnt; i++) { for (PRUint32 i=0; i < cnt; i++)
folder = getter_AddRefs((nsIMsgFolder*)mSubFolders->ElementAt(i)); {
if(NS_SUCCEEDED(rv)) nsCOMPtr<nsISupports> supports = getter_AddRefs(mSubFolders->ElementAt(i));
folder = do_QueryInterface(supports, &rv);
if(NS_SUCCEEDED(rv) && folder)
{ {
// CAREFUL! if NULL is passed in for result then the caller // CAREFUL! if NULL is passed in for result then the caller
// still wants the full count! Otherwise, the result should be at most the // still wants the full count! Otherwise, the result should be at most the