зеркало из https://github.com/mozilla/pjs.git
Bug 474369 - get rid of nsVoidArray; toolkit part; r+sr=benjamin
This commit is contained in:
Родитель
bb21fd5718
Коммит
a2a8485923
|
@ -41,7 +41,6 @@
|
|||
#include "nsIAutoCompleteResult.h"
|
||||
#include "nsIAutoCompleteSimpleResult.h"
|
||||
|
||||
#include "nsVoidArray.h"
|
||||
#include "nsString.h"
|
||||
#include "prtypes.h"
|
||||
#include "nsCOMPtr.h"
|
||||
|
|
|
@ -52,7 +52,6 @@
|
|||
#include "nsNativeCharsetUtils.h"
|
||||
#include "nsNetUtil.h"
|
||||
#include "nsUnicharUtils.h"
|
||||
#include "nsVoidArray.h"
|
||||
#include "nsTArray.h"
|
||||
#include "nsXPCOMCID.h"
|
||||
#include "plstr.h"
|
||||
|
|
|
@ -48,7 +48,6 @@
|
|||
#include "nsCRT.h"
|
||||
#include "prmem.h"
|
||||
#include "nsPrintfCString.h"
|
||||
#include "nsVoidArray.h"
|
||||
#include "nsIDateTimeFormat.h"
|
||||
#include "nsDateTimeFormatCID.h"
|
||||
#include "nsQuickSort.h"
|
||||
|
@ -252,7 +251,7 @@ protected:
|
|||
PRInt16 mSortType;
|
||||
PRInt32 mTotalRows;
|
||||
|
||||
nsVoidArray mCurrentFilters;
|
||||
nsTArray<PRUnichar*> mCurrentFilters;
|
||||
|
||||
PRPackedBool mShowHiddenFiles;
|
||||
PRPackedBool mDirectoryFilter;
|
||||
|
@ -285,8 +284,8 @@ nsFileView::nsFileView() :
|
|||
|
||||
nsFileView::~nsFileView()
|
||||
{
|
||||
PRInt32 count = mCurrentFilters.Count();
|
||||
for (PRInt32 i = 0; i < count; ++i)
|
||||
PRUint32 count = mCurrentFilters.Length();
|
||||
for (PRUint32 i = 0; i < count; ++i)
|
||||
NS_Free(mCurrentFilters[i]);
|
||||
}
|
||||
|
||||
|
@ -461,8 +460,8 @@ nsFileView::SetDirectory(nsIFile* aDirectory)
|
|||
NS_IMETHODIMP
|
||||
nsFileView::SetFilter(const nsAString& aFilterString)
|
||||
{
|
||||
PRInt32 filterCount = mCurrentFilters.Count();
|
||||
for (PRInt32 i = 0; i < filterCount; ++i)
|
||||
PRUint32 filterCount = mCurrentFilters.Length();
|
||||
for (PRUint32 i = 0; i < filterCount; ++i)
|
||||
NS_Free(mCurrentFilters[i]);
|
||||
mCurrentFilters.Clear();
|
||||
|
||||
|
@ -845,7 +844,7 @@ nsFileView::FilterFiles()
|
|||
mTotalRows = count;
|
||||
mFileList->Count(&count);
|
||||
mFilteredFiles->Clear();
|
||||
PRInt32 filterCount = mCurrentFilters.Count();
|
||||
PRUint32 filterCount = mCurrentFilters.Length();
|
||||
|
||||
nsCOMPtr<nsIFile> file;
|
||||
for (PRUint32 i = 0; i < count; ++i) {
|
||||
|
@ -861,15 +860,15 @@ nsFileView::FilterFiles()
|
|||
}
|
||||
|
||||
if (!isHidden) {
|
||||
for (PRInt32 j = 0; j < filterCount; ++j) {
|
||||
for (PRUint32 j = 0; j < filterCount; ++j) {
|
||||
PRBool matched = PR_FALSE;
|
||||
if (!nsCRT::strcmp((const PRUnichar*) mCurrentFilters.ElementAt(j),
|
||||
if (!nsCRT::strcmp(mCurrentFilters.ElementAt(j),
|
||||
NS_LITERAL_STRING("..apps").get()))
|
||||
{
|
||||
file->IsExecutable(&matched);
|
||||
} else
|
||||
matched = (NS_WildCardMatch(ucsLeafName.get(),
|
||||
(const PRUnichar*) mCurrentFilters.ElementAt(j),
|
||||
mCurrentFilters.ElementAt(j),
|
||||
PR_TRUE) == MATCH);
|
||||
|
||||
if (matched) {
|
||||
|
|
|
@ -78,7 +78,6 @@
|
|||
#include "nsITreeView.h"
|
||||
#endif
|
||||
#include "nsString.h"
|
||||
#include "nsVoidArray.h"
|
||||
#include "nsWeakReference.h"
|
||||
#include "nsTArray.h"
|
||||
#include "nsINavBookmarksService.h"
|
||||
|
|
|
@ -58,7 +58,6 @@
|
|||
#include "nsIPrefService.h"
|
||||
#include "nsIPrefBranch.h"
|
||||
#include "nsIPrefBranch2.h"
|
||||
#include "nsVoidArray.h"
|
||||
#include "nsCOMArray.h"
|
||||
#include "mozStorageHelper.h"
|
||||
#include "mozStorageCID.h"
|
||||
|
|
|
@ -37,7 +37,6 @@
|
|||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "nsGnomeVFSService.h"
|
||||
#include "nsVoidArray.h"
|
||||
#include "nsStringAPI.h"
|
||||
#include "nsIURI.h"
|
||||
#include "nsTArray.h"
|
||||
|
|
Загрузка…
Ссылка в новой задаче