gecko-dev/dom/base/nsAtomListUtils.cpp
Nicholas Nethercote 0e2f1f5ab8 Bug 1444031 - Rename nsStaticAtom::mAtom as mAtomp. r=froydnj
Because (a) that name better indicates that it's a pointer to a pointer, and
(b) because nsStaticAtom::mString is going to be renamed as mAtom in bug
1411469.

MozReview-Commit-ID: D5tuNOstMgr

--HG--
extra : rebase_source : 9344eeea0288c8c52c069ce21e8bc55f6e0f3f6f
2018-03-08 11:42:06 +11:00

26 lines
836 B
C++

/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/*
* Static helper class for implementing atom lists.
*/
#include "nsAtomListUtils.h"
#include "nsAtom.h"
#include "nsStaticAtom.h"
/* static */ bool
nsAtomListUtils::IsMember(nsAtom *aAtom,
const nsStaticAtomSetup* aSetup,
uint32_t aCount)
{
for (const nsStaticAtomSetup *setup = aSetup, *setup_end = aSetup + aCount;
setup != setup_end; ++setup) {
if (aAtom == *(setup->mAtomp))
return true;
}
return false;
}