Bug 1519636 - Reformat recent changes to the Google coding style r=emilio,necko-reviewers,geckoview-reviewers,application-update-reviewers,media-playback-reviewers,devtools-reviewers,anti-tracking-reviewers,profiler-reviewers,win-reviewers,migration-reviewers,padenot,mconley,nchevobbe,kershaw,gstoll,mstange,bytesized,m_kato

This new version of clang 17 also slightly changed the formatting.

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D215914
This commit is contained in:
Sylvestre Ledru 2024-07-17 11:15:31 +00:00
parent 0724661e06
commit 45030f6970
213 changed files with 524 additions and 608 deletions

View File

@ -53,10 +53,11 @@ struct AtkStateMap {
};
// Map array from cross platform states to ATK states
static const AtkStateMap gAtkStateMap[] =
{
// Cross Platform States
// clang-format off
static const AtkStateMap
gAtkStateMap[] =
{
// Cross Platform States
// clang-format off
{ kNone, kMapOpposite }, // states::UNAVAILABLE = 1 << 0
{ ATK_STATE_SELECTED, kMapDirectly }, // states::SELECTED = 1 << 1
{ ATK_STATE_FOCUSED, kMapDirectly }, // states::FOCUSED = 1 << 2
@ -106,7 +107,7 @@ static const AtkStateMap gAtkStateMap[] =
{ ATK_STATE_EXPANDABLE, kMapDirectly }, // states::EXPANDABLE = 1 << 46
{ kNone, kMapDirectly }, // states::PINNED = 1 << 47
{ ATK_STATE_ACTIVE, kMapDirectly } // states::CURRENT = 1 << 48
// clang-format on
// clang-format on
};
static const auto gAtkStateMapLen = std::extent<decltype(gAtkStateMap)>::value;

View File

@ -231,7 +231,7 @@ void EventQueue::CoalesceEvents() {
default:
break; // case eAllowDupes, eDoNotEmit
} // switch
} // switch
}
void EventQueue::CoalesceSelChangeEvents(AccSelChangeEvent* aTailEvent,

View File

@ -211,7 +211,7 @@ class TextAttrsMgr {
class InvalidTextAttr : public TTextAttr<uint32_t> {
public:
InvalidTextAttr(nsIContent* aRootElm, nsIContent* aElm);
virtual ~InvalidTextAttr(){};
virtual ~InvalidTextAttr() {};
protected:
enum { eFalse, eGrammar, eSpelling, eTrue };

View File

@ -372,14 +372,13 @@ static int32_t sPlatformDisabledState = 0;
////////////////////////////////////////////////////////////////////////////////
// Markup maps array.
#define Attr(name, value) \
{ nsGkAtoms::name, nsGkAtoms::value }
#define Attr(name, value) {nsGkAtoms::name, nsGkAtoms::value}
#define AttrFromDOM(name, DOMAttrName) \
{ nsGkAtoms::name, nullptr, nsGkAtoms::DOMAttrName }
{nsGkAtoms::name, nullptr, nsGkAtoms::DOMAttrName}
#define AttrFromDOMIf(name, DOMAttrName, DOMAttrValue) \
{ nsGkAtoms::name, nullptr, nsGkAtoms::DOMAttrName, nsGkAtoms::DOMAttrValue }
{nsGkAtoms::name, nullptr, nsGkAtoms::DOMAttrName, nsGkAtoms::DOMAttrValue}
#define MARKUPMAP(atom, new_func, r, ...) \
{nsGkAtoms::atom, new_func, static_cast<a11y::role>(r), {__VA_ARGS__}},

View File

@ -77,10 +77,10 @@ uint16_t RotorRule::Match(Accessible* aAcc) {
RotorRoleRule::RotorRoleRule(role aRole, Accessible* aDirectDescendantsFrom,
const nsString& aSearchText)
: RotorRule(aDirectDescendantsFrom, aSearchText), mRole(aRole){};
: RotorRule(aDirectDescendantsFrom, aSearchText), mRole(aRole) {};
RotorRoleRule::RotorRoleRule(role aRole, const nsString& aSearchText)
: RotorRule(aSearchText), mRole(aRole){};
: RotorRule(aSearchText), mRole(aRole) {};
uint16_t RotorRoleRule::Match(Accessible* aAcc) {
uint16_t result = RotorRule::Match(aAcc);
@ -135,10 +135,10 @@ uint16_t RotorMacRoleRule::Match(Accessible* aAcc) {
RotorControlRule::RotorControlRule(Accessible* aDirectDescendantsFrom,
const nsString& aSearchText)
: RotorRule(aDirectDescendantsFrom, aSearchText){};
: RotorRule(aDirectDescendantsFrom, aSearchText) {};
RotorControlRule::RotorControlRule(const nsString& aSearchText)
: RotorRule(aSearchText){};
: RotorRule(aSearchText) {};
uint16_t RotorControlRule::Match(Accessible* aAcc) {
uint16_t result = RotorRule::Match(aAcc);
@ -207,10 +207,10 @@ uint16_t RotorControlRule::Match(Accessible* aAcc) {
RotorTextEntryRule::RotorTextEntryRule(Accessible* aDirectDescendantsFrom,
const nsString& aSearchText)
: RotorRule(aDirectDescendantsFrom, aSearchText){};
: RotorRule(aDirectDescendantsFrom, aSearchText) {};
RotorTextEntryRule::RotorTextEntryRule(const nsString& aSearchText)
: RotorRule(aSearchText){};
: RotorRule(aSearchText) {};
uint16_t RotorTextEntryRule::Match(Accessible* aAcc) {
uint16_t result = RotorRule::Match(aAcc);
@ -232,10 +232,10 @@ uint16_t RotorTextEntryRule::Match(Accessible* aAcc) {
RotorLinkRule::RotorLinkRule(Accessible* aDirectDescendantsFrom,
const nsString& aSearchText)
: RotorRule(aDirectDescendantsFrom, aSearchText){};
: RotorRule(aDirectDescendantsFrom, aSearchText) {};
RotorLinkRule::RotorLinkRule(const nsString& aSearchText)
: RotorRule(aSearchText){};
: RotorRule(aSearchText) {};
uint16_t RotorLinkRule::Match(Accessible* aAcc) {
uint16_t result = RotorRule::Match(aAcc);
@ -325,10 +325,10 @@ uint16_t RotorNotMacRoleRule::Match(Accessible* aAcc) {
RotorStaticTextRule::RotorStaticTextRule(Accessible* aDirectDescendantsFrom,
const nsString& aSearchText)
: RotorRule(aDirectDescendantsFrom, aSearchText){};
: RotorRule(aDirectDescendantsFrom, aSearchText) {};
RotorStaticTextRule::RotorStaticTextRule(const nsString& aSearchText)
: RotorRule(aSearchText){};
: RotorRule(aSearchText) {};
uint16_t RotorStaticTextRule::Match(Accessible* aAcc) {
uint16_t result = RotorRule::Match(aAcc);
@ -353,11 +353,11 @@ RotorHeadingLevelRule::RotorHeadingLevelRule(int32_t aLevel,
Accessible* aDirectDescendantsFrom,
const nsString& aSearchText)
: RotorRoleRule(roles::HEADING, aDirectDescendantsFrom, aSearchText),
mLevel(aLevel){};
mLevel(aLevel) {};
RotorHeadingLevelRule::RotorHeadingLevelRule(int32_t aLevel,
const nsString& aSearchText)
: RotorRoleRule(roles::HEADING, aSearchText), mLevel(aLevel){};
: RotorRoleRule(roles::HEADING, aSearchText), mLevel(aLevel) {};
uint16_t RotorHeadingLevelRule::Match(Accessible* aAcc) {
uint16_t result = RotorRoleRule::Match(aAcc);

View File

@ -17,8 +17,8 @@ namespace a11y {
class sdnDocAccessible final : public ISimpleDOMDocument {
public:
explicit sdnDocAccessible(MsaaDocAccessible* aMsaa) : mMsaa(aMsaa){};
~sdnDocAccessible(){};
explicit sdnDocAccessible(MsaaDocAccessible* aMsaa) : mMsaa(aMsaa) {};
~sdnDocAccessible() {};
DECL_IUNKNOWN

View File

@ -20,7 +20,7 @@ namespace a11y {
class sdnTextAccessible final : public ISimpleDOMText {
public:
explicit sdnTextAccessible(MsaaAccessible* aMsaa) : mMsaa(aMsaa){};
explicit sdnTextAccessible(MsaaAccessible* aMsaa) : mMsaa(aMsaa) {};
~sdnTextAccessible() {}
DECL_IUNKNOWN

View File

@ -103,8 +103,8 @@ uint64_t XULMenuitemAccessible::NativeState() const {
(grandParentState & states::INVISIBLE) |
(grandParentState & states::OPAQUE1);
} // isCollapsed
} // isSelected
} // ROLE_COMBOBOX_OPTION
} // isSelected
} // ROLE_COMBOBOX_OPTION
return state;
}

View File

@ -17,8 +17,9 @@ using GlobalInitializerFn = void(__cdecl*)(void);
// Allocation of static initialization section for the freestanding library
#pragma section(".freestd$a", read)
__declspec(allocate(".freestd$a")) static const GlobalInitializerFn
FreeStdStart = reinterpret_cast<GlobalInitializerFn>(0);
__declspec(allocate(
".freestd$a")) static const GlobalInitializerFn FreeStdStart =
reinterpret_cast<GlobalInitializerFn>(0);
#pragma section(".freestd$z", read)
__declspec(allocate(".freestd$z")) static const GlobalInitializerFn FreeStdEnd =

View File

@ -14,10 +14,10 @@ class nsKeychainMigrationUtils : public nsIKeychainMigrationUtils {
NS_DECL_ISUPPORTS
NS_DECL_NSIKEYCHAINMIGRATIONUTILS
nsKeychainMigrationUtils(){};
nsKeychainMigrationUtils() {};
protected:
virtual ~nsKeychainMigrationUtils(){};
virtual ~nsKeychainMigrationUtils() {};
};
#endif

View File

@ -70,7 +70,7 @@ class AsyncFaviconDataReady final : public nsIFaviconDataCallback {
int aIconIndex, int aTimeStamp)
: mSearchResult(std::move(aSearchResult)),
mIconIndex(aIconIndex),
mTimeStamp(aTimeStamp){};
mTimeStamp(aTimeStamp) {};
private:
~AsyncFaviconDataReady() {}

View File

@ -23,7 +23,7 @@ class nsGNOMEShellSearchProvider;
class GnomeHistoryIcon {
public:
GnomeHistoryIcon() : mTimeStamp(-1), mWidth(0), mHeight(0){};
GnomeHistoryIcon() : mTimeStamp(-1), mWidth(0), mHeight(0) {};
// From which search is this icon
void Set(int aTimeStamp, mozilla::UniquePtr<uint8_t[]> aData, int aWidth,
@ -58,7 +58,7 @@ class nsGNOMEShellHistorySearchResult : public nsUnixRemoteServer {
GDBusConnection* aConnection, int aTimeStamp)
: mSearchProvider(aSearchProvider),
mConnection(aConnection),
mTimeStamp(aTimeStamp){};
mTimeStamp(aTimeStamp) {};
void SetReply(RefPtr<GDBusMethodInvocation> aReply) {
mReply = std::move(aReply);

View File

@ -16,7 +16,7 @@ class nsMacShellService : public nsIMacShellService,
public nsToolkitShellService,
public nsIWebProgressListener {
public:
nsMacShellService(){};
nsMacShellService() {};
NS_DECL_ISUPPORTS
NS_DECL_NSISHELLSERVICE
@ -24,7 +24,7 @@ class nsMacShellService : public nsIMacShellService,
NS_DECL_NSIWEBPROGRESSLISTENER
protected:
virtual ~nsMacShellService(){};
virtual ~nsMacShellService() {};
private:
nsCOMPtr<nsIFile> mBackgroundFile;

View File

@ -593,8 +593,7 @@ int ElfSection::getIndex() {
ElfSection* reference;
for (reference = previous;
(reference != nullptr) && (reference->getType() == SHT_NULL);
reference = reference->getPrevious())
;
reference = reference->getPrevious());
if (reference == nullptr) return (index = 1);
return (index = reference->getIndex() + 1);
}
@ -644,8 +643,7 @@ unsigned int ElfSegment::getFileSize() {
// Search the last section that is not SHT_NOBITS
std::list<ElfSection*>::reverse_iterator i;
for (i = sections.rbegin();
(i != sections.rend()) && ((*i)->getType() == SHT_NOBITS); ++i)
;
(i != sections.rend()) && ((*i)->getType() == SHT_NOBITS); ++i);
// All sections are SHT_NOBITS
if (i == sections.rend()) return 0;

View File

@ -136,7 +136,7 @@ class ElfPlainValue : public ElfValue {
unsigned int value;
public:
ElfPlainValue(unsigned int val) : value(val){};
ElfPlainValue(unsigned int val) : value(val) {};
unsigned int getValue() { return value; }
};
@ -146,7 +146,7 @@ class ElfLocation : public ElfValue {
public:
enum position { ABSOLUTE, RELATIVE };
ElfLocation() : section(nullptr), offset(0){};
ElfLocation() : section(nullptr), offset(0) {};
ElfLocation(ElfSection* section, unsigned int off,
enum position pos = RELATIVE);
ElfLocation(unsigned int location, Elf* elf);
@ -159,7 +159,7 @@ class ElfSize : public ElfValue {
ElfSection* section;
public:
ElfSize(ElfSection* s) : section(s){};
ElfSize(ElfSection* s) : section(s) {};
unsigned int getValue();
ElfSection* getSection() { return section; }
};
@ -168,7 +168,7 @@ class ElfEntSize : public ElfValue {
ElfSection* section;
public:
ElfEntSize(ElfSection* s) : section(s){};
ElfEntSize(ElfSection* s) : section(s) {};
unsigned int getValue();
ElfSection* getSection() { return section; }
};
@ -176,8 +176,8 @@ class ElfEntSize : public ElfValue {
template <typename T>
class serializable : public T::Type64 {
public:
serializable(){};
serializable(const typename T::Type64& p) : T::Type64(p){};
serializable() {};
serializable(const typename T::Type64& p) : T::Type64(p) {};
private:
template <typename R>
@ -493,9 +493,9 @@ class Elf_Ehdr : public serializable<Elf_Ehdr_Traits>, public ElfSection {
class Elf_Phdr : public serializable<Elf_Phdr_Traits> {
public:
Elf_Phdr(){};
Elf_Phdr() {};
Elf_Phdr(std::ifstream& file, unsigned char ei_class, unsigned char ei_data)
: serializable<Elf_Phdr_Traits>(file, ei_class, ei_data){};
: serializable<Elf_Phdr_Traits>(file, ei_class, ei_data) {};
bool contains(ElfSection* section) {
unsigned int size = section->getSize();
unsigned int addr = section->getAddr();
@ -563,10 +563,10 @@ class ElfSymtab_Section : public ElfSection {
class Elf_Rel : public serializable<Elf_Rel_Traits> {
public:
Elf_Rel() : serializable<Elf_Rel_Traits>(){};
Elf_Rel() : serializable<Elf_Rel_Traits>() {};
Elf_Rel(std::ifstream& file, unsigned char ei_class, unsigned char ei_data)
: serializable<Elf_Rel_Traits>(file, ei_class, ei_data){};
: serializable<Elf_Rel_Traits>(file, ei_class, ei_data) {};
static const unsigned int sh_type = SHT_REL;
static const unsigned int d_tag = DT_REL;
@ -575,10 +575,10 @@ class Elf_Rel : public serializable<Elf_Rel_Traits> {
class Elf_Rela : public serializable<Elf_Rela_Traits> {
public:
Elf_Rela() : serializable<Elf_Rela_Traits>(){};
Elf_Rela() : serializable<Elf_Rela_Traits>() {};
Elf_Rela(std::ifstream& file, unsigned char ei_class, unsigned char ei_data)
: serializable<Elf_Rela_Traits>(file, ei_class, ei_data){};
: serializable<Elf_Rela_Traits>(file, ei_class, ei_data) {};
static const unsigned int sh_type = SHT_RELA;
static const unsigned int d_tag = DT_RELA;
@ -654,8 +654,7 @@ inline unsigned char Elf::getMachine() { return ehdr->e_machine; }
inline unsigned int Elf::getSize() {
ElfSection* section;
for (section = shdr_section /* It's usually not far from the end */;
section->getNext() != nullptr; section = section->getNext())
;
section->getNext() != nullptr; section = section->getNext());
return section->getOffset() + section->getSize();
}

View File

@ -73,8 +73,7 @@ static int mkdirs(char* path, mode_t mode) {
if (l > 1 && path[l - 1] == '.' && path[l - 2] == '/') path[l - 2] = 0;
while (*path == '/' && path[1] == '/') path++;
for (cp = strrchr(path, '/'); cp && cp != path && *(cp - 1) == '/'; cp--)
;
for (cp = strrchr(path, '/'); cp && cp != path && *(cp - 1) == '/'; cp--);
if (cp && cp != path) {
*cp = '\0';
if ((lstat(path, &sb) < 0 || !S_ISDIR(sb.st_mode)) &&

View File

@ -47,7 +47,7 @@ class MOZ_RAII AutoMemMap {
public:
explicit AutoMemMap()
: fileSize(0), fd(nullptr), fileMap(nullptr), addr(nullptr){};
: fileSize(0), fd(nullptr), fileMap(nullptr), addr(nullptr) {};
~AutoMemMap();
// Initialize this AutoMemMap.

View File

@ -201,7 +201,7 @@ struct DeserializedStackFrame {
functionDisplayName(nullptr),
isSystem(false),
isSelfHosted(false),
owner(nullptr){};
owner(nullptr) {};
};
struct DeserializedStackFrame::HashPolicy {

View File

@ -173,7 +173,7 @@ class HeapSnapshot final : public nsISupports, public nsWrapperCache {
// serializes it to disk, or memory, or a socket, etc.
class CoreDumpWriter {
public:
virtual ~CoreDumpWriter(){};
virtual ~CoreDumpWriter() {};
// Write the given bits of metadata we would like to associate with this core
// dump.

View File

@ -317,7 +317,7 @@ using FieldSetterType = typename GetFieldSetterType<T>::SetterArg;
* remove fields of the wrong size. */ \
template <size_t Size> \
struct Fields : eachfield(MOZ_DECL_SYNCED_FIELD_INHERIT) \
syncedcontext::Empty<SYNCED_FIELD_COUNT, Size> {}; \
syncedcontext::Empty<SYNCED_FIELD_COUNT, Size>{}; \
\
/* Struct containing the data for all synced fields as members. We filter \
* sizes to lay out fields of size 1, then 2, then 4 and last 8 or greater. \

View File

@ -31,13 +31,13 @@ class nsIScrollObserver : public nsISupports {
* Called when an async panning/zooming transform has started being applied
* and passed the scroll offset
*/
MOZ_CAN_RUN_SCRIPT virtual void AsyncPanZoomStarted(){};
MOZ_CAN_RUN_SCRIPT virtual void AsyncPanZoomStarted() {};
/**
* Called when an async panning/zooming transform is no longer applied
* and passed the scroll offset
*/
MOZ_CAN_RUN_SCRIPT virtual void AsyncPanZoomStopped(){};
MOZ_CAN_RUN_SCRIPT virtual void AsyncPanZoomStopped() {};
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsIScrollObserver, NS_ISCROLLOBSERVER_IID)

View File

@ -50,8 +50,7 @@ static bool ParseFloat(const nsAString& aString, double& aDouble) {
}
if (IsAsciiDigit(*iter)) {
for (; iter != end && IsAsciiDigit(*iter); ++iter)
;
for (; iter != end && IsAsciiDigit(*iter); ++iter);
} else if (*iter == char16_t('.')) {
// Do nothing, jumps to fraction part
} else {
@ -67,8 +66,7 @@ static bool ParseFloat(const nsAString& aString, double& aDouble) {
return false;
}
for (; iter != end && IsAsciiDigit(*iter); ++iter)
;
for (; iter != end && IsAsciiDigit(*iter); ++iter);
}
if (iter != end && (*iter == char16_t('e') || *iter == char16_t('E'))) {
@ -82,8 +80,7 @@ static bool ParseFloat(const nsAString& aString, double& aDouble) {
return false;
}
for (; iter != end && IsAsciiDigit(*iter); ++iter)
;
for (; iter != end && IsAsciiDigit(*iter); ++iter);
}
if (iter != end) {
@ -118,8 +115,7 @@ void ResponsiveImageSelector::ParseSourceSet(
// Extra commas at this point are a non-fatal syntax error.
for (; iter != end &&
(nsContentUtils::IsHTMLWhitespace(*iter) || *iter == char16_t(','));
++iter)
;
++iter);
if (iter == end) {
break;
@ -128,8 +124,7 @@ void ResponsiveImageSelector::ParseSourceSet(
url = iter;
// Find end of url
for (; iter != end && !nsContentUtils::IsHTMLWhitespace(*iter); ++iter)
;
for (; iter != end && !nsContentUtils::IsHTMLWhitespace(*iter); ++iter);
// Omit trailing commas from URL.
// Multiple commas are a non-fatal error.
@ -476,7 +471,7 @@ void ResponsiveImageCandidate::SetParameterAsDensity(double aDensity) {
// there is no candidate type that uses all of these. This should generally
// match the mValue union of ResponsiveImageCandidate.
struct ResponsiveImageDescriptors {
ResponsiveImageDescriptors() : mInvalid(false){};
ResponsiveImageDescriptors() : mInvalid(false) {};
Maybe<double> mDensity;
Maybe<int32_t> mWidth;
@ -603,8 +598,7 @@ bool ResponsiveImageCandidate::ConsumeDescriptors(
// https://html.spec.whatwg.org/#parse-a-srcset-attribute
// Skip initial whitespace
for (; iter != end && nsContentUtils::IsHTMLWhitespace(*iter); ++iter)
;
for (; iter != end && nsContentUtils::IsHTMLWhitespace(*iter); ++iter);
nsAString::const_iterator currentDescriptor = iter;
@ -628,8 +622,7 @@ bool ResponsiveImageCandidate::ConsumeDescriptors(
// End of current descriptor, consume it, skip spaces
// ("After descriptor" state in spec) before continuing
descriptors.AddDescriptor(Substring(currentDescriptor, iter));
for (; iter != end && nsContentUtils::IsHTMLWhitespace(*iter); ++iter)
;
for (; iter != end && nsContentUtils::IsHTMLWhitespace(*iter); ++iter);
if (iter == end) {
break;
}

View File

@ -27,8 +27,7 @@ TreeWalker::TreeWalker(nsINode* aRoot, uint32_t aWhatToShow,
NodeFilter* aFilter)
: nsTraversal(aRoot, aWhatToShow, aFilter), mCurrentNode(aRoot) {}
TreeWalker::~TreeWalker() { /* destructor code */
}
TreeWalker::~TreeWalker() { /* destructor code */ }
/*
* nsISupports and cycle collection stuff

View File

@ -25,8 +25,7 @@ nsTraversal::nsTraversal(nsINode* aRoot, uint32_t aWhatToShow,
NS_ASSERTION(aRoot, "invalid root in call to nsTraversal constructor");
}
nsTraversal::~nsTraversal() { /* destructor code */
}
nsTraversal::~nsTraversal() { /* destructor code */ }
/*
* Tests if and how a node should be filtered. Uses mWhatToShow and

View File

@ -16,8 +16,7 @@ class CacheWorkerRef;
class ActorChild {
public:
virtual void StartDestroy() = 0;
virtual void NoteDeletedActor() { /*no-op*/
}
virtual void NoteDeletedActor() { /*no-op*/ }
void SetWorkerRef(SafeRefPtr<CacheWorkerRef> aWorkerRef);

View File

@ -61,7 +61,7 @@ class FetchDriverObserver {
};
virtual void OnResponseEnd(EndReason aReason,
JS::Handle<JS::Value> aReasonDetails){};
JS::Handle<JS::Value> aReasonDetails) {};
nsIConsoleReportCollector* GetReporter() const { return mReporter; }

View File

@ -89,7 +89,7 @@ class GetFilesHelper : public Runnable, public GetFilesHelperBase {
virtual void Work(ErrorResult& aRv);
virtual void Cancel(){};
virtual void Cancel() {};
NS_IMETHOD
Run() override;

View File

@ -1806,7 +1806,7 @@ class HTMLMediaElement : public nsGenericHTMLElement,
already_AddRefed<PlayPromise> CreatePlayPromise(ErrorResult& aRv) const;
virtual void MaybeBeginCloningVisually(){};
virtual void MaybeBeginCloningVisually() {};
uint32_t GetPreloadDefault() const;
uint32_t GetPreloadDefaultAuto() const;

View File

@ -186,9 +186,7 @@ void HTMLTableCellElement::MapAttributesIntoRule(
NS_IMETHODIMP_(bool)
HTMLTableCellElement::IsAttributeMapped(const nsAtom* aAttribute) const {
static const MappedAttributeEntry attributes[] = {
{nsGkAtoms::align},
{nsGkAtoms::valign},
{nsGkAtoms::nowrap},
{nsGkAtoms::align}, {nsGkAtoms::valign}, {nsGkAtoms::nowrap},
#if 0
// XXXldb If these are implemented, they might need to move to
// GetAttributeChangeHint (depending on how, and preferably not).
@ -197,10 +195,7 @@ HTMLTableCellElement::IsAttributeMapped(const nsAtom* aAttribute) const {
{ nsGkAtoms::headers },
{ nsGkAtoms::scope },
#endif
{nsGkAtoms::width},
{nsGkAtoms::height},
{nullptr}
};
{nsGkAtoms::width}, {nsGkAtoms::height}, {nullptr}};
static const MappedAttributeEntry* const map[] = {
attributes,

View File

@ -214,7 +214,7 @@ class ElementTranslationHandler : public PromiseNativeHandler {
public:
explicit ElementTranslationHandler(DOMLocalization* aDOMLocalization,
nsXULPrototypeDocument* aProto)
: mDOMLocalization(aDOMLocalization), mProto(aProto){};
: mDOMLocalization(aDOMLocalization), mProto(aProto) {};
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_CLASS(ElementTranslationHandler)

View File

@ -18,7 +18,7 @@ class LockRequestParent final : public PLockRequestParent {
NS_INLINE_DECL_REFCOUNTING(LockRequestParent)
explicit LockRequestParent(const IPCLockRequest& aRequest)
: mRequest(aRequest){};
: mRequest(aRequest) {};
const IPCLockRequest& Data() { return mRequest; }

View File

@ -68,33 +68,33 @@ class DOMMediaStream : public DOMEventTargetHelper,
* Called when the DOMMediaStream has a live track added, either by
* script (addTrack()) or the source creating one.
*/
virtual void NotifyTrackAdded(const RefPtr<MediaStreamTrack>& aTrack){};
virtual void NotifyTrackAdded(const RefPtr<MediaStreamTrack>& aTrack) {};
/**
* Called when the DOMMediaStream removes a live track from playback, either
* by script (removeTrack(), track.stop()) or the source ending it.
*/
virtual void NotifyTrackRemoved(const RefPtr<MediaStreamTrack>& aTrack){};
virtual void NotifyTrackRemoved(const RefPtr<MediaStreamTrack>& aTrack) {};
/**
* Called when the DOMMediaStream has become active.
*/
virtual void NotifyActive(){};
virtual void NotifyActive() {};
/**
* Called when the DOMMediaStream has become inactive.
*/
virtual void NotifyInactive(){};
virtual void NotifyInactive() {};
/**
* Called when the DOMMediaStream has become audible.
*/
virtual void NotifyAudible(){};
virtual void NotifyAudible() {};
/**
* Called when the DOMMediaStream has become inaudible.
*/
virtual void NotifyInaudible(){};
virtual void NotifyInaudible() {};
protected:
virtual ~TrackListener() = default;

View File

@ -112,7 +112,7 @@ void PromoteRenderingThreadAndroid() {
("GraphRunner promoted thread priority: %d",
java::sdk::Process::GetThreadPriority(java::sdk::Process::MyTid())));
}
}; // namespace
}; // namespace
#endif // MOZ_WIDGET_ANDROID
NS_IMETHODIMP GraphRunner::Run() {

View File

@ -56,7 +56,7 @@ class MediaDevices final : public DOMEventTargetHelper {
JS::Handle<JSObject*> aGivenProto) override;
// No code needed, as MediaTrackSupportedConstraints members default to true.
void GetSupportedConstraints(MediaTrackSupportedConstraints& aResult){};
void GetSupportedConstraints(MediaTrackSupportedConstraints& aResult) {};
already_AddRefed<Promise> GetUserMedia(
const MediaStreamConstraints& aConstraints, CallerType aCallerType,

View File

@ -47,8 +47,8 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(MediaStreamTrackSource)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
auto MediaStreamTrackSource::ApplyConstraints(
const dom::MediaTrackConstraints& aConstraints, CallerType aCallerType)
-> RefPtr<ApplyConstraintsPromise> {
const dom::MediaTrackConstraints& aConstraints,
CallerType aCallerType) -> RefPtr<ApplyConstraintsPromise> {
return ApplyConstraintsPromise::CreateAndReject(
MakeRefPtr<MediaMgrError>(MediaMgrError::Name::OverconstrainedError, ""),
__func__);

View File

@ -173,7 +173,7 @@ class MediaStreamTrackSource : public nsISupports {
/**
* Same for GetSettings (no-op).
*/
virtual void GetSettings(dom::MediaTrackSettings& aResult){};
virtual void GetSettings(dom::MediaTrackSettings& aResult) {};
/**
* Called by the source interface when all registered sinks with
@ -343,12 +343,12 @@ class MediaStreamTrackConsumer : public SupportsWeakPtr {
* Unlike the "ended" event exposed to script this is called for any reason,
* including MediaStreamTrack::Stop().
*/
virtual void NotifyEnded(MediaStreamTrack* aTrack){};
virtual void NotifyEnded(MediaStreamTrack* aTrack) {};
/**
* Called when the track's enabled state changes.
*/
virtual void NotifyEnabledChanged(MediaStreamTrack* aTrack, bool aEnabled){};
virtual void NotifyEnabledChanged(MediaStreamTrack* aTrack, bool aEnabled) {};
};
// clang-format off

View File

@ -36,8 +36,8 @@ class MOZ_CAPABILITY("mutex") MultiWriterQueueReaderLocking_Mutex {
class MOZ_CAPABILITY("dummy lock") MultiWriterQueueReaderLocking_None {
public:
#ifndef DEBUG
void Lock() MOZ_CAPABILITY_ACQUIRE(){};
void Unlock() MOZ_CAPABILITY_RELEASE(){};
void Lock() MOZ_CAPABILITY_ACQUIRE() {};
void Unlock() MOZ_CAPABILITY_RELEASE() {};
#else
// DEBUG-mode checks to catch concurrent misuses.
void Lock() MOZ_CAPABILITY_ACQUIRE() {

View File

@ -38,7 +38,7 @@ FlacFrameParser::FlacFrameParser()
mMaxFrameSize(0),
mNumFrames(0),
mFullMetadata(false),
mPacketCount(0){};
mPacketCount(0) {};
FlacFrameParser::~FlacFrameParser() = default;

View File

@ -59,8 +59,8 @@ class AudioVerifier {
// Returns the maximum difference in value between two adjacent samples along
// the sine curve.
Sample MaxMagnitudeDifference() {
return static_cast<Sample>(AudioGenerator<Sample>::Amplitude() *
2 * sin(2 * M_PI * mFrequency / mRate));
return static_cast<Sample>(AudioGenerator<Sample>::Amplitude() * 2 *
sin(2 * M_PI * mFrequency / mRate));
}
bool PreSilenceEnded() const {

View File

@ -101,7 +101,7 @@ TEST_F(TestDeviceInputTrack, DeviceInputConsumerTrack) {
}
void ProcessInput(GraphTime aFrom, GraphTime aTo,
uint32_t aFlags) override{/* Ignored */};
uint32_t aFlags) override { /* Ignored */ };
uint32_t NumberOfChannels() const override {
if (mInputs.IsEmpty()) {
@ -134,9 +134,8 @@ TEST_F(TestDeviceInputTrack, DeviceInputConsumerTrack) {
bool IsVoiceInput(MediaTrackGraph* aGraph) const override {
return mIsVoice;
};
void DeviceChanged(MediaTrackGraph* aGraph) override { /* Ignored */
}
void Disconnect(MediaTrackGraph* aGraph) override{/* Ignored */};
void DeviceChanged(MediaTrackGraph* aGraph) override { /* Ignored */ }
void Disconnect(MediaTrackGraph* aGraph) override { /* Ignored */ };
void NotifySetRequestedInputProcessingParamsResult(
MediaTrackGraph* aGraph, cubeb_input_processing_params aRequestedParams,
const Result<cubeb_input_processing_params, int>& aResult) override {

View File

@ -21,7 +21,7 @@ namespace mozilla {
class CaptureTask::MediaTrackEventListener : public MediaTrackListener {
public:
explicit MediaTrackEventListener(CaptureTask* aCaptureTask)
: mCaptureTask(aCaptureTask){};
: mCaptureTask(aCaptureTask) {};
// MediaTrackListener methods.
void NotifyEnded(MediaTrackGraph* aGraph) override {

View File

@ -192,8 +192,8 @@ RefPtr<GenericNonExclusivePromise> RDDProcessManager::LaunchRDDProcess() {
}
auto RDDProcessManager::EnsureRDDProcessAndCreateBridge(
base::ProcessId aOtherProcess, dom::ContentParentId aParentId)
-> RefPtr<EnsureRDDPromise> {
base::ProcessId aOtherProcess,
dom::ContentParentId aParentId) -> RefPtr<EnsureRDDPromise> {
return InvokeAsync(
GetMainThreadSerialEventTarget(), __func__,
[aOtherProcess, aParentId, this]() -> RefPtr<EnsureRDDPromise> {

View File

@ -107,9 +107,9 @@ class MediaControlKeySource {
// Override these methods if the inherited key source want to know the change
// for following attributes. For example, GeckoView would use these methods
// to notify change to the embedded application.
virtual void SetEnableFullScreen(bool aIsEnabled){};
virtual void SetEnablePictureInPictureMode(bool aIsEnabled){};
virtual void SetPositionState(const Maybe<PositionState>& aState){};
virtual void SetEnableFullScreen(bool aIsEnabled) {};
virtual void SetEnablePictureInPictureMode(bool aIsEnabled) {};
virtual void SetPositionState(const Maybe<PositionState>& aState) {};
protected:
virtual ~MediaControlKeySource() = default;

View File

@ -70,10 +70,10 @@ class AudioDecoderInputTrack final : public ProcessedMediaTrack {
};
struct EOS {};
SPSCData() : mData(Empty()){};
explicit SPSCData(ClearFutureData&& aArg) : mData(std::move(aArg)){};
explicit SPSCData(DecodedData&& aArg) : mData(std::move(aArg)){};
explicit SPSCData(EOS&& aArg) : mData(std::move(aArg)){};
SPSCData() : mData(Empty()) {};
explicit SPSCData(ClearFutureData&& aArg) : mData(std::move(aArg)) {};
explicit SPSCData(DecodedData&& aArg) : mData(std::move(aArg)) {};
explicit SPSCData(EOS&& aArg) : mData(std::move(aArg)) {};
bool HasData() const { return !mData.is<Empty>(); }
bool IsClearFutureData() const { return mData.is<ClearFutureData>(); }

View File

@ -111,7 +111,7 @@ class MediaSink {
// Single frame rendering operation may need to be done before playback
// started (1st frame) or right after seek completed or playback stopped.
// Do nothing if this sink has no video track. Can be called in any state.
virtual void Redraw(const VideoInfo& aInfo){};
virtual void Redraw(const VideoInfo& aInfo) {};
// Begin a playback session with the provided start time in the media data
// and media info. Must be called when playback is stopped. aStartTime is

View File

@ -43,7 +43,7 @@ class SimpleMap {
using MapType = AutoTArray<ElementType, 16>;
public:
SimpleMap() : mLock("SimpleMap"){};
SimpleMap() : mLock("SimpleMap") {};
// Check if aKey is in the map.
bool Contains(const K& aKey) {

View File

@ -44,7 +44,7 @@ class JavaCallbacksSupport
}
virtual void HandleOutputFormatChanged(
java::sdk::MediaFormat::Param aFormat){};
java::sdk::MediaFormat::Param aFormat) {};
void OnOutputFormatChanged(jni::Object::Param aFormat) {
if (!mCanceled) {

View File

@ -127,7 +127,7 @@ class MFMediaEngineStream
// Overwrite this method if inherited class needs to perform clean up on the
// task queue when the stream gets shutdowned.
virtual void ShutdownCleanUpOnTaskQueue(){};
virtual void ShutdownCleanUpOnTaskQueue() {};
// Inherited class must implement this method to return decoded data. it
// should uses `mRawDataQueueForGeneratingOutput` to generate output.

View File

@ -142,7 +142,7 @@ class PCUuidGenerator : public mozilla::JsepUuidGenerator {
// elapsed time is recorded in seconds.
struct PeerConnectionAutoTimer {
PeerConnectionAutoTimer()
: mRefCnt(0), mStart(TimeStamp::Now()), mUsedAV(false){};
: mRefCnt(0), mStart(TimeStamp::Now()), mUsedAV(false) {};
void RegisterConnection();
void UnregisterConnection(bool aContainedAV);
bool IsStopped();

View File

@ -29,7 +29,7 @@ class RTCStatsIdGenerator {
dom::RTCStatsCollection* aIntoReport);
private:
virtual ~RTCStatsIdGenerator(){};
virtual ~RTCStatsIdGenerator() {};
nsString Id(const nsString& aKey);
nsString Generate();

View File

@ -51,8 +51,8 @@ void RemoteTrackSource::Destroy() {
}
auto RemoteTrackSource::ApplyConstraints(
const dom::MediaTrackConstraints& aConstraints, dom::CallerType aCallerType)
-> RefPtr<ApplyConstraintsPromise> {
const dom::MediaTrackConstraints& aConstraints,
dom::CallerType aCallerType) -> RefPtr<ApplyConstraintsPromise> {
return ApplyConstraintsPromise::CreateAndReject(
MakeRefPtr<MediaMgrError>(
dom::MediaStreamError::Name::OverconstrainedError, ""),

View File

@ -162,9 +162,8 @@ auto WebrtcGlobalStatsHistory::Entry::Prune(const DOMHighResTimeStamp aBefore)
// Note: we always keep the most recent SDP
}
auto WebrtcGlobalStatsHistory::InitHistory(const nsAString& aPcId,
const bool aIsLongTermStatsDisabled)
-> void {
auto WebrtcGlobalStatsHistory::InitHistory(
const nsAString& aPcId, const bool aIsLongTermStatsDisabled) -> void {
MOZ_ASSERT(XRE_IsParentProcess());
if (WebrtcGlobalStatsHistory::Get().MaybeGet(aPcId)) {
return;

View File

@ -27,10 +27,9 @@ auto SdpTelemetry::RecordCompare(const SdpTelemetry::Results& aFirst,
Telemetry::ScalarAdd(Telemetry::ScalarID::WEBRTC_SDP_PARSER_DIFF, bucket, 1);
}
auto SdpTelemetry::BucketNameFragment(const SdpTelemetry::Results& aResult,
const SdpTelemetry::Modes& aMode,
const SdpTelemetry::Roles& aRole)
-> nsAutoString {
auto SdpTelemetry::BucketNameFragment(
const SdpTelemetry::Results& aResult, const SdpTelemetry::Modes& aMode,
const SdpTelemetry::Roles& aRole) -> nsAutoString {
auto mode = [&]() -> std::string {
switch (aMode) {
case Modes::Parallel:

View File

@ -27,8 +27,8 @@ class SdpTelemetry {
static auto RecordParse(const Results& aResults, const Modes& aMode,
const Roles& aRole) -> void;
static auto RecordSecondaryParse(const Results& aResult, const Modes& aMode)
-> void;
static auto RecordSecondaryParse(const Results& aResult,
const Modes& aMode) -> void;
static auto RecordCompare(const Results& aFirst, const Results& aSecond,
const Modes& aMode) -> void;

View File

@ -21,7 +21,7 @@ class SpeechSynthesisService final
NS_DECL_ISUPPORTS
NS_DECL_NSISPEECHSERVICE
SpeechSynthesisService(){};
SpeechSynthesisService() {};
void Setup();
@ -46,7 +46,7 @@ class SpeechSynthesisService final
static StaticRefPtr<SpeechSynthesisService> sSingleton;
private:
virtual ~SpeechSynthesisService(){};
virtual ~SpeechSynthesisService() {};
nsCOMPtr<nsISpeechTask> mTask;

View File

@ -69,10 +69,10 @@ class PrototypeDocumentContentSink final : public nsIStreamLoaderObserver,
// nsIContentSink
NS_IMETHOD WillParse(void) override { return NS_OK; };
NS_IMETHOD WillInterrupt(void) override { return NS_OK; };
void WillResume() override{};
void WillResume() override {};
NS_IMETHOD SetParser(nsParserBase* aParser) override;
virtual void InitialTranslationCompleted() override;
virtual void FlushPendingNotifications(FlushType aType) override{};
virtual void FlushPendingNotifications(FlushType aType) override {};
virtual void SetDocumentCharset(NotNull<const Encoding*> aEncoding) override;
virtual nsISupports* GetTarget() override;
virtual bool IsScriptExecuting() override;

View File

@ -39,7 +39,7 @@ class ShadowRealmGlobalScope final : public nsIGlobalObject,
NS_DECLARE_STATIC_IID_ACCESSOR(SHADOWREALMGLOBALSCOPE_IID)
explicit ShadowRealmGlobalScope(nsIGlobalObject* aCreatingGlobal)
: mCreatingGlobal(aCreatingGlobal){};
: mCreatingGlobal(aCreatingGlobal) {};
nsIGlobalObject* GetCreatingGlobal() const { return mCreatingGlobal; }
OriginTrials Trials() const override { return {}; }

View File

@ -301,7 +301,7 @@ class nsXMLContentSerializer : public nsIContentSerializer {
* the serialization of the end tag.
* (called at the end of AppendElementStart)
*/
virtual void AfterElementEnd(nsIContent* aContent, nsAString& aStr){};
virtual void AfterElementEnd(nsIContent* aContent, nsAString& aStr) {};
/**
* Returns true if a line break should be inserted before an element open tag

View File

@ -21,7 +21,7 @@ namespace mozilla::dom {
struct ValueWithSize : LinkedListElement<ValueWithSize> {
ValueWithSize(JS::Handle<JS::Value> aValue, double aSize)
: mValue(aValue), mSize(aSize){};
: mValue(aValue), mSize(aSize) {};
JS::Heap<JS::Value> mValue;
double mSize = 0.0f;

View File

@ -165,8 +165,7 @@ class SVGElement : public SVGElementBase // nsIContent
// Only visible for SVGGraphicElement, so it's a no-op here, and that
// subclass has the useful implementation.
virtual void SetAnimateMotionTransform(
const mozilla::gfx::Matrix* aMatrix) { /*no-op*/
}
const mozilla::gfx::Matrix* aMatrix) { /*no-op*/ }
virtual const mozilla::gfx::Matrix* GetAnimateMotionTransform() const {
return nullptr;
}

View File

@ -11,7 +11,7 @@
class nsOSPermissionRequest : public nsOSPermissionRequestBase {
public:
nsOSPermissionRequest(){};
nsOSPermissionRequest() {};
NS_IMETHOD GetAudioCapturePermissionState(uint16_t* aAudio) override;

View File

@ -23,7 +23,8 @@ class WinWebAuthnService final : public nsIWebAuthnService {
static nsresult EnsureWinWebAuthnModuleLoaded();
WinWebAuthnService()
: mTransactionState(Nothing(), "WinWebAuthnService::mTransactionState"){};
: mTransactionState(Nothing(), "WinWebAuthnService::mTransactionState") {
};
private:
~WinWebAuthnService();

View File

@ -19,8 +19,8 @@ WorkerLoadContext::WorkerLoadContext(
mKind(aKind),
mClientInfo(aClientInfo),
mScriptLoader(aScriptLoader),
mOnlyExistingCachedResourcesAllowed(
aOnlyExistingCachedResourcesAllowed){};
mOnlyExistingCachedResourcesAllowed(aOnlyExistingCachedResourcesAllowed) {
};
ThreadSafeRequestHandle::ThreadSafeRequestHandle(
JS::loader::ScriptLoadRequest* aRequest, nsISerialEventTarget* aSyncTarget)

View File

@ -136,7 +136,7 @@ class RemoteWorkerCSPEventListener final : public nsICSPEventListener {
NS_DECL_ISUPPORTS
explicit RemoteWorkerCSPEventListener(RemoteWorkerChild* aActor)
: mActor(aActor){};
: mActor(aActor) {};
NS_IMETHOD OnCSPViolationEvent(const nsAString& aJSON) override {
mActor->CSPViolationPropagationOnMainThread(aJSON);

View File

@ -16,7 +16,7 @@ class ErrorObserver {
/**
* Default Destructor for ErrorObserver
**/
virtual ~ErrorObserver(){};
virtual ~ErrorObserver() {};
/**
* Notifies this Error observer of a new error aRes

View File

@ -171,8 +171,7 @@ static void ProcessMarginRightValue(const nsAString* aInputString,
}
}
#define CSS_EQUIV_TABLE_NONE \
{ CSSEditUtils::eCSSEditableProperty_NONE, 0 }
#define CSS_EQUIV_TABLE_NONE {CSSEditUtils::eCSSEditableProperty_NONE, 0}
const CSSEditUtils::CSSEquivTable boldEquivTable[] = {
{CSSEditUtils::eCSSEditableProperty_font_weight, true, false, ProcessBValue,

View File

@ -1204,13 +1204,10 @@ struct ElementInfo final {
#ifdef DEBUG
# define ELEM(_tag, _isContainer, _canContainSelf, _group, _canContainGroups) \
{ \
eHTMLTag_##_tag, _group, _canContainGroups, _isContainer, \
_canContainSelf \
}
{eHTMLTag_##_tag, _group, _canContainGroups, _isContainer, _canContainSelf}
#else
# define ELEM(_tag, _isContainer, _canContainSelf, _group, _canContainGroups) \
{ _group, _canContainGroups, _isContainer, _canContainSelf }
{_group, _canContainGroups, _isContainer, _canContainSelf}
#endif
static const ElementInfo kElements[eHTMLTag_userdefined] = {

View File

@ -1236,7 +1236,7 @@ HTMLEditor::HTMLWithContextInserter::InsertContents(
rv != NS_SUCCESS_EDITOR_BUT_IGNORED_TRIVIAL_ERROR,
"CreateContentResult::SuggestCaretPointTo() failed, but ignored");
break; // from the inner `for` loop
} // end of the inner `for` loop
} // end of the inner `for` loop
}
}
if (lastInsertedPoint.IsSet()) {

View File

@ -3698,7 +3698,7 @@ nsresult HTMLEditor::RemoveInlinePropertiesAsSubAction(
// cases.
FlushAndStopTrackingAndShrinkSelectionRange();
} // for-loop of selectionRanges
} // for-loop of styles
} // for-loop of styles
MOZ_ASSERT(!selectionRanges.HasSavedRanges());
nsresult rv = selectionRanges.ApplyTo(SelectionRef());

View File

@ -287,7 +287,7 @@ void InternetCiter::Rewrap(const nsAString& aInString, uint32_t aWrapCol,
BreakLine(aOutString, outStringCol, citeLevel);
}
} // end inner loop within one line of aInString
} // end outer loop over lines of aInString
} // end outer loop over lines of aInString
}
} // namespace mozilla

View File

@ -240,8 +240,7 @@ typedef struct gss_channel_bindings_struct {
#define GSS_C_NO_CONTEXT ((gss_ctx_id_t)0)
#define GSS_C_NO_CREDENTIAL ((gss_cred_id_t)0)
#define GSS_C_NO_CHANNEL_BINDINGS ((gss_channel_bindings_t)0)
#define GSS_C_EMPTY_BUFFER \
{ 0, nullptr }
#define GSS_C_EMPTY_BUFFER {0, nullptr}
/*
* Some alternate names for a couple of the above

View File

@ -958,12 +958,9 @@ class StreamingGeometrySink : public ID2D1SimplifiedGeometrySink {
ToPoint(aSegments[i].point3));
}
}
STDMETHOD(Close)() { /* Should never be called! */
return S_OK;
}
STDMETHOD(Close)() { /* Should never be called! */ return S_OK; }
STDMETHOD_(void, SetSegmentFlags)
(D2D1_PATH_SEGMENT aFlags) { /* Should never be called! */
}
(D2D1_PATH_SEGMENT aFlags) { /* Should never be called! */ }
STDMETHOD_(void, EndFigure)(D2D1_FIGURE_END aEnd) {
AutoRestoreFP resetFloatingPoint;

View File

@ -89,9 +89,7 @@ class OpeningGeometrySink : public ID2D1SimplifiedGeometrySink {
EnsureFigureEnded();
return mSink->AddBeziers(aSegments, aCount);
}
STDMETHOD(Close)() { /* Should never be called! */
return S_OK;
}
STDMETHOD(Close)() { /* Should never be called! */ return S_OK; }
STDMETHOD_(void, SetSegmentFlags)(D2D1_PATH_SEGMENT aFlags) {
return mSink->SetSegmentFlags(aFlags);
}

View File

@ -108,11 +108,11 @@ class SharedSurface {
virtual void Commit() {}
protected:
virtual void LockProdImpl(){};
virtual void UnlockProdImpl(){};
virtual void LockProdImpl() {};
virtual void UnlockProdImpl() {};
virtual void ProducerAcquireImpl(){};
virtual void ProducerReleaseImpl(){};
virtual void ProducerAcquireImpl() {};
virtual void ProducerReleaseImpl() {};
virtual void ProducerReadAcquireImpl() { ProducerAcquireImpl(); }
virtual void ProducerReadReleaseImpl() { ProducerReleaseImpl(); }

View File

@ -49,7 +49,7 @@ class SharedSurface_EGLImage final : public SharedSurface {
virtual void ProducerReleaseImpl() override;
virtual void ProducerReadAcquireImpl() override;
virtual void ProducerReadReleaseImpl() override{};
virtual void ProducerReadReleaseImpl() override {};
Maybe<layers::SurfaceDescriptor> ToSurfaceDescriptor() override;
};

View File

@ -55,14 +55,14 @@ class AxisPhysicsModel {
protected:
struct State {
State(double ap, double av) : p(ap), v(av){};
State(double ap, double av) : p(ap), v(av) {};
double p; // Position
double v; // Velocity
};
struct Derivative {
Derivative() : dp(0.0), dv(0.0){};
Derivative(double aDp, double aDv) : dp(aDp), dv(aDv){};
Derivative() : dp(0.0), dv(0.0) {};
Derivative(double aDp, double aDv) : dp(aDp), dv(aDv) {};
double dp; // dp / delta time = Position
double dv; // dv / delta time = Velocity
};

View File

@ -150,8 +150,9 @@ static auto ForEachNode(Node aRoot, const PreAction& aPreAction,
* ForEachNode pre-order traversal, using TraversalFlag.
*/
template <typename Iterator, typename Node, typename PreAction>
auto ForEachNode(Node aRoot, const PreAction& aPreAction) -> std::enable_if_t<
std::is_same_v<decltype(aPreAction(aRoot)), TraversalFlag>, bool> {
auto ForEachNode(Node aRoot, const PreAction& aPreAction)
-> std::enable_if_t<
std::is_same_v<decltype(aPreAction(aRoot)), TraversalFlag>, bool> {
return ForEachNode<Iterator>(
aRoot, aPreAction, [](Node aNode) { return TraversalFlag::Continue; });
}
@ -184,8 +185,7 @@ template <typename Iterator, typename Node, typename PostAction>
auto ForEachNodePostOrder(Node aRoot, const PostAction& aPostAction)
-> std::enable_if_t<std::is_same_v<decltype(aPostAction(aRoot)), void>,
void> {
ForEachNode<Iterator>(
aRoot, [](Node aNode) {}, aPostAction);
ForEachNode<Iterator>(aRoot, [](Node aNode) {}, aPostAction);
}
/*

View File

@ -58,8 +58,7 @@ class APZCBasicTester : public APZCTesterBase {
}
virtual void TearDown() {
while (mcc->RunThroughDelayedTasks())
;
while (mcc->RunThroughDelayedTasks());
apzc->Destroy();
tm->ClearTree();
tm->ClearContentController();

View File

@ -38,8 +38,7 @@ class APZCTreeManagerTester : public APZCTesterBase {
}
virtual void TearDown() {
while (mcc->RunThroughDelayedTasks())
;
while (mcc->RunThroughDelayedTasks());
manager->ClearTree();
manager->ClearContentController();

View File

@ -158,8 +158,7 @@ TEST_F(APZEventRegionsTesterMock, HitRegionImmediateResponse) {
nsTArray<ScrollableLayerGuid> targets;
targets.AppendElement(left->GetGuid());
manager->SetTargetAPZC(result.mInputBlockId, targets);
while (mcc->RunThroughDelayedTasks())
; // this runs the tap event
while (mcc->RunThroughDelayedTasks()); // this runs the tap event
check.Call("Tapped on left this time");
}

View File

@ -133,8 +133,7 @@ TEST_F(APZCGestureDetectorTester, Pan_After_Pinch) {
// Clear out any remaining fling animation and pending tasks
apzc->AdvanceAnimationsUntilEnd();
while (mcc->RunThroughDelayedTasks())
;
while (mcc->RunThroughDelayedTasks());
apzc->AssertStateIsReset();
}
#endif
@ -225,8 +224,7 @@ TEST_F(APZCGestureDetectorTester, Pan_With_Tap) {
// Clear out any remaining fling animation and pending tasks
apzc->AdvanceAnimationsUntilEnd();
while (mcc->RunThroughDelayedTasks())
;
while (mcc->RunThroughDelayedTasks());
apzc->AssertStateIsReset();
}
@ -286,14 +284,12 @@ class APZCFlingStopTester : public APZCGestureDetectorTester {
HandleTap(TapType::eSingleTap, _, 0, apzc->GetGuid(), _, _))
.Times(tapCallsExpected);
Tap(apzc, ScreenIntPoint(10, 10), 0);
while (mcc->RunThroughDelayedTasks())
;
while (mcc->RunThroughDelayedTasks());
// Deliver another tap, to make sure that taps are flowing properly once
// the fling is aborted.
Tap(apzc, ScreenIntPoint(100, 100), 0);
while (mcc->RunThroughDelayedTasks())
;
while (mcc->RunThroughDelayedTasks());
// Verify that we didn't advance any further after the fling was aborted, in
// either case.
@ -847,8 +843,7 @@ TEST_F(APZCGestureDetectorTester, TapTimeoutInterruptedByWheel) {
Wheel(apzc, ScreenIntPoint(10, 10), ScreenPoint(0, -10), mcc->Time())
.mInputBlockId;
EXPECT_NE(result.mInputBlockId, wheelBlockId);
while (mcc->RunThroughDelayedTasks())
;
while (mcc->RunThroughDelayedTasks());
}
TEST_F(APZCGestureDetectorTester, LongPressWithInputQueueDelay) {

View File

@ -79,7 +79,7 @@ class CompositableClient {
virtual void Dump(std::stringstream& aStream, const char* aPrefix = "",
bool aDumpHtml = false,
TextureDumpMode aCompress = TextureDumpMode::Compress){};
TextureDumpMode aCompress = TextureDumpMode::Compress) {};
virtual TextureInfo GetTextureInfo() const = 0;

View File

@ -28,7 +28,7 @@ class GPUVideoTextureData : public TextureData {
bool Lock(OpenMode) override { return true; };
void Unlock() override{};
void Unlock() override {};
bool Serialize(SurfaceDescriptor& aOutDescriptor) override;

View File

@ -286,7 +286,7 @@ class TextureData {
return false;
};
virtual void SyncWithObject(RefPtr<SyncObjectClient> aSyncObject){};
virtual void SyncWithObject(RefPtr<SyncObjectClient> aSyncObject) {};
virtual TextureFlags GetTextureFlags() const {
return TextureFlags::NO_FLAGS;

View File

@ -85,7 +85,7 @@ class gfxSingleFaceMacFontFamily final : public gfxFontFamily {
virtual ~gfxSingleFaceMacFontFamily() = default;
void FindStyleVariationsLocked(FontInfoData* aFontInfoData = nullptr)
MOZ_REQUIRES(mLock) override{};
MOZ_REQUIRES(mLock) override {};
void LocalizedName(nsACString& aLocalizedName) override;

View File

@ -806,7 +806,7 @@ static inline void draw_quad_spans(int nump, Point2D p[4], uint32_t z,
// Helper to find the previous index in the points array, walking backward.
#define PREV_POINT(idx) \
({ \
int cur = (idx)-1; \
int cur = (idx) - 1; \
cur >= 0 ? cur : nump - 1; \
})
// Start looking for "left"-side and "right"-side descending edges starting

View File

@ -20,10 +20,10 @@
#define IOKIT_FRAMEWORK_PATH "/System/Library/Frameworks/IOKit.framework/IOKit"
#ifndef kIOPSTimeRemainingUnknown
# define kIOPSTimeRemainingUnknown ((CFTimeInterval)-1.0)
# define kIOPSTimeRemainingUnknown ((CFTimeInterval) - 1.0)
#endif
#ifndef kIOPSTimeRemainingUnlimited
# define kIOPSTimeRemainingUnlimited ((CFTimeInterval)-2.0)
# define kIOPSTimeRemainingUnlimited ((CFTimeInterval) - 2.0)
#endif
using namespace mozilla::dom::battery;

View File

@ -197,8 +197,8 @@ static void extractAttributeValue(const char* aSearchString,
aResult.Assign(startOfAttribute);
}
} // if we have a attribute value
} // if we have a attribute name
} // if we got non-null search string and attribute name values
} // if we have a attribute name
} // if we got non-null search string and attribute name values
}
nsresult nsMozIconURI::SetSpecInternal(const nsACString& aSpec) {

View File

@ -442,7 +442,7 @@ static nsresult MakeIconBuffer(HICON aIcon, ByteBuf* aOutBuffer) {
} // if we got mask bits
delete colorInfo;
} // if we allocated the buffer
} // if we got mask size
} // if we got mask size
DeleteDC(hDC);
DeleteObject(iconInfo.hbmColor);

View File

@ -276,11 +276,9 @@ NS_IMPL_ISUPPORTS_INHERITED(ImageDecoderHelper, Runnable,
NS_IMPL_ISUPPORTS(imgTools, imgITools)
imgTools::imgTools() { /* member initializers and constructor code */
}
imgTools::imgTools() { /* member initializers and constructor code */ }
imgTools::~imgTools() { /* destructor code */
}
imgTools::~imgTools() { /* destructor code */ }
NS_IMETHODIMP
imgTools::DecodeImageFromArrayBuffer(JS::Handle<JS::Value> aArrayBuffer,

View File

@ -22,7 +22,7 @@ class NumberParser {
static Result<UniquePtr<NumberParser>, ICUError> TryCreate(
const char* aLocale, bool aUseGrouping);
NumberParser() : mNumberFormat(nullptr){};
NumberParser() : mNumberFormat(nullptr) {};
NumberParser(const NumberParser&) = delete;
NumberParser& operator=(const NumberParser&) = delete;
~NumberParser();

View File

@ -30,7 +30,7 @@ typedef tis_char th_char;
# define TH_THAIBEGIN_ 0xa0
# define th_isthai(c) ((c) >= 0xa0)
#endif
#define th_zcode(c) ((c)-TH_THAIBEGIN_)
#define th_zcode(c) ((c) - TH_THAIBEGIN_)
enum TH_CHARNAME {
TH_THAIBEGIN = TH_THAIBEGIN_,

View File

@ -132,7 +132,7 @@ class MessagePump {
virtual nsISerialEventTarget* GetXPCOMThread() { return nullptr; }
protected:
virtual ~MessagePump(){};
virtual ~MessagePump() {};
};
} // namespace base

View File

@ -20,7 +20,7 @@ class ForkServer {
static constexpr int kClientPipeFd = 3;
ForkServer();
~ForkServer(){};
~ForkServer() {};
void InitProcess(int* aArgc, char*** aArgv);
bool HandleMessages();

View File

@ -259,8 +259,7 @@ void MessagePumpForChildProcess::Run(base::MessagePump::Delegate* aDelegate) {
bool nestableTasksAllowed = loop->NestableTasksAllowed();
loop->SetNestableTasksAllowed(true);
while (aDelegate->DoWork())
;
while (aDelegate->DoWork());
loop->SetNestableTasksAllowed(nestableTasksAllowed);

View File

@ -162,10 +162,9 @@ bool NodeController::SendUserMessage(const PortRef& aPort,
return false;
}
auto NodeController::SerializeEventMessage(UniquePtr<Event> aEvent,
const NodeName* aRelayTarget,
uint32_t aType)
-> UniquePtr<IPC::Message> {
auto NodeController::SerializeEventMessage(
UniquePtr<Event> aEvent, const NodeName* aRelayTarget,
uint32_t aType) -> UniquePtr<IPC::Message> {
UniquePtr<IPC::Message> message;
if (aEvent->type() == Event::kUserMessage) {
MOZ_DIAGNOSTIC_ASSERT(

View File

@ -28,7 +28,7 @@ namespace mozilla::ipc {
class UtilityAudioDecoderChildShutdownObserver : public nsIObserver {
public:
explicit UtilityAudioDecoderChildShutdownObserver(SandboxingKind aKind)
: mSandbox(aKind){};
: mSandbox(aKind) {};
NS_DECL_ISUPPORTS

View File

@ -202,8 +202,7 @@ class JS_PUBLIC_API GenericPrinter {
virtual size_t index() const { return 0; }
// In some printers, this ensure that the content is fully written.
virtual void flush() { /* Do nothing */
}
virtual void flush() { /* Do nothing */ }
// Report that a string operation failed to get the memory it requested.
virtual void reportOutOfMemory();

View File

@ -452,6 +452,6 @@ struct JSFunctionSpec {
#define JS_SYM_FNSPEC(symbol, call, info, nargs, flags, selfHostedName) \
JS_FNSPEC(::JS::SymbolCode::symbol, call, info, nargs, flags, selfHostedName)
#define JS_FNSPEC(name, call, info, nargs, flags, selfHostedName) \
{ JSFunctionSpec::Name(name), {call, info}, nargs, flags, selfHostedName }
{JSFunctionSpec::Name(name), {call, info}, nargs, flags, selfHostedName}
#endif // js_PropertySpec_h

View File

@ -95,7 +95,7 @@ extern JS_PUBLIC_API uint32_t GetThreadType(void);
# else
inline bool InitThreadType(void) { return true; }
inline void SetThreadType(ThreadType t){};
inline void SetThreadType(ThreadType t) {};
inline uint32_t GetThreadType(void) { return 0; }
inline uint32_t GetAllocationThreadType(void) { return 0; }
inline uint32_t GetStackCheckThreadType(void) { return 0; }

Some files were not shown because too many files have changed in this diff Show More