зеркало из https://github.com/mozilla/gecko-dev.git
Use the NS_ARRAY_LENGTH macro rather in place of other macros that existed before it. b=378697 r+sr=roc
This commit is contained in:
Родитель
760e4a955d
Коммит
3eac6a113c
|
@ -254,8 +254,6 @@ nsGTKRemoteService::Observe(nsISupports* aSubject,
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
#define ARRAY_LENGTH(array_) (sizeof(array_)/sizeof(array_[0]))
|
||||
|
||||
// Minimize the roundtrips to the X server by getting all the atoms at once
|
||||
static char *XAtomNames[] = {
|
||||
MOZILLA_VERSION_PROP,
|
||||
|
@ -267,7 +265,7 @@ static char *XAtomNames[] = {
|
|||
MOZILLA_PROGRAM_PROP,
|
||||
MOZILLA_COMMANDLINE_PROP
|
||||
};
|
||||
static Atom XAtoms[ARRAY_LENGTH(XAtomNames)];
|
||||
static Atom XAtoms[NS_ARRAY_LENGTH(XAtomNames)];
|
||||
|
||||
void
|
||||
nsGTKRemoteService::EnsureAtoms(void)
|
||||
|
@ -275,7 +273,7 @@ nsGTKRemoteService::EnsureAtoms(void)
|
|||
if (sMozVersionAtom)
|
||||
return;
|
||||
|
||||
XInternAtoms(GDK_DISPLAY(), XAtomNames, ARRAY_LENGTH(XAtomNames),
|
||||
XInternAtoms(GDK_DISPLAY(), XAtomNames, NS_ARRAY_LENGTH(XAtomNames),
|
||||
False, XAtoms);
|
||||
int i = 0;
|
||||
sMozVersionAtom = XAtoms[i++];
|
||||
|
|
|
@ -296,8 +296,6 @@ typedef void (*_gdk_window_set_urgency_hint_fn)(GdkWindow *window,
|
|||
// cursor cache
|
||||
static GdkCursor *gCursorCache[eCursorCount];
|
||||
|
||||
#define ARRAY_LENGTH(a) (sizeof(a)/sizeof(a[0]))
|
||||
|
||||
nsWindow::nsWindow()
|
||||
{
|
||||
mContainer = nsnull;
|
||||
|
@ -365,7 +363,7 @@ nsWindow::~nsWindow()
|
|||
/* static */ void
|
||||
nsWindow::ReleaseGlobals()
|
||||
{
|
||||
for (PRUint32 i = 0; i < ARRAY_LENGTH(gCursorCache); ++i) {
|
||||
for (PRUint32 i = 0; i < NS_ARRAY_LENGTH(gCursorCache); ++i) {
|
||||
if (gCursorCache[i]) {
|
||||
gdk_cursor_unref(gCursorCache[i]);
|
||||
gCursorCache[i] = nsnull;
|
||||
|
|
Загрузка…
Ссылка в новой задаче