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

View File

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

View File

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

View File

@ -372,14 +372,13 @@ static int32_t sPlatformDisabledState = 0;
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// Markup maps array. // Markup maps array.
#define Attr(name, value) \ #define Attr(name, value) {nsGkAtoms::name, nsGkAtoms::value}
{ nsGkAtoms::name, nsGkAtoms::value }
#define AttrFromDOM(name, DOMAttrName) \ #define AttrFromDOM(name, DOMAttrName) \
{ nsGkAtoms::name, nullptr, nsGkAtoms::DOMAttrName } {nsGkAtoms::name, nullptr, nsGkAtoms::DOMAttrName}
#define AttrFromDOMIf(name, DOMAttrName, DOMAttrValue) \ #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, ...) \ #define MARKUPMAP(atom, new_func, r, ...) \
{nsGkAtoms::atom, new_func, static_cast<a11y::role>(r), {__VA_ARGS__}}, {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, RotorRoleRule::RotorRoleRule(role aRole, Accessible* aDirectDescendantsFrom,
const nsString& aSearchText) const nsString& aSearchText)
: RotorRule(aDirectDescendantsFrom, aSearchText), mRole(aRole){}; : RotorRule(aDirectDescendantsFrom, aSearchText), mRole(aRole) {};
RotorRoleRule::RotorRoleRule(role aRole, const nsString& aSearchText) RotorRoleRule::RotorRoleRule(role aRole, const nsString& aSearchText)
: RotorRule(aSearchText), mRole(aRole){}; : RotorRule(aSearchText), mRole(aRole) {};
uint16_t RotorRoleRule::Match(Accessible* aAcc) { uint16_t RotorRoleRule::Match(Accessible* aAcc) {
uint16_t result = RotorRule::Match(aAcc); uint16_t result = RotorRule::Match(aAcc);
@ -135,10 +135,10 @@ uint16_t RotorMacRoleRule::Match(Accessible* aAcc) {
RotorControlRule::RotorControlRule(Accessible* aDirectDescendantsFrom, RotorControlRule::RotorControlRule(Accessible* aDirectDescendantsFrom,
const nsString& aSearchText) const nsString& aSearchText)
: RotorRule(aDirectDescendantsFrom, aSearchText){}; : RotorRule(aDirectDescendantsFrom, aSearchText) {};
RotorControlRule::RotorControlRule(const nsString& aSearchText) RotorControlRule::RotorControlRule(const nsString& aSearchText)
: RotorRule(aSearchText){}; : RotorRule(aSearchText) {};
uint16_t RotorControlRule::Match(Accessible* aAcc) { uint16_t RotorControlRule::Match(Accessible* aAcc) {
uint16_t result = RotorRule::Match(aAcc); uint16_t result = RotorRule::Match(aAcc);
@ -207,10 +207,10 @@ uint16_t RotorControlRule::Match(Accessible* aAcc) {
RotorTextEntryRule::RotorTextEntryRule(Accessible* aDirectDescendantsFrom, RotorTextEntryRule::RotorTextEntryRule(Accessible* aDirectDescendantsFrom,
const nsString& aSearchText) const nsString& aSearchText)
: RotorRule(aDirectDescendantsFrom, aSearchText){}; : RotorRule(aDirectDescendantsFrom, aSearchText) {};
RotorTextEntryRule::RotorTextEntryRule(const nsString& aSearchText) RotorTextEntryRule::RotorTextEntryRule(const nsString& aSearchText)
: RotorRule(aSearchText){}; : RotorRule(aSearchText) {};
uint16_t RotorTextEntryRule::Match(Accessible* aAcc) { uint16_t RotorTextEntryRule::Match(Accessible* aAcc) {
uint16_t result = RotorRule::Match(aAcc); uint16_t result = RotorRule::Match(aAcc);
@ -232,10 +232,10 @@ uint16_t RotorTextEntryRule::Match(Accessible* aAcc) {
RotorLinkRule::RotorLinkRule(Accessible* aDirectDescendantsFrom, RotorLinkRule::RotorLinkRule(Accessible* aDirectDescendantsFrom,
const nsString& aSearchText) const nsString& aSearchText)
: RotorRule(aDirectDescendantsFrom, aSearchText){}; : RotorRule(aDirectDescendantsFrom, aSearchText) {};
RotorLinkRule::RotorLinkRule(const nsString& aSearchText) RotorLinkRule::RotorLinkRule(const nsString& aSearchText)
: RotorRule(aSearchText){}; : RotorRule(aSearchText) {};
uint16_t RotorLinkRule::Match(Accessible* aAcc) { uint16_t RotorLinkRule::Match(Accessible* aAcc) {
uint16_t result = RotorRule::Match(aAcc); uint16_t result = RotorRule::Match(aAcc);
@ -325,10 +325,10 @@ uint16_t RotorNotMacRoleRule::Match(Accessible* aAcc) {
RotorStaticTextRule::RotorStaticTextRule(Accessible* aDirectDescendantsFrom, RotorStaticTextRule::RotorStaticTextRule(Accessible* aDirectDescendantsFrom,
const nsString& aSearchText) const nsString& aSearchText)
: RotorRule(aDirectDescendantsFrom, aSearchText){}; : RotorRule(aDirectDescendantsFrom, aSearchText) {};
RotorStaticTextRule::RotorStaticTextRule(const nsString& aSearchText) RotorStaticTextRule::RotorStaticTextRule(const nsString& aSearchText)
: RotorRule(aSearchText){}; : RotorRule(aSearchText) {};
uint16_t RotorStaticTextRule::Match(Accessible* aAcc) { uint16_t RotorStaticTextRule::Match(Accessible* aAcc) {
uint16_t result = RotorRule::Match(aAcc); uint16_t result = RotorRule::Match(aAcc);
@ -353,11 +353,11 @@ RotorHeadingLevelRule::RotorHeadingLevelRule(int32_t aLevel,
Accessible* aDirectDescendantsFrom, Accessible* aDirectDescendantsFrom,
const nsString& aSearchText) const nsString& aSearchText)
: RotorRoleRule(roles::HEADING, aDirectDescendantsFrom, aSearchText), : RotorRoleRule(roles::HEADING, aDirectDescendantsFrom, aSearchText),
mLevel(aLevel){}; mLevel(aLevel) {};
RotorHeadingLevelRule::RotorHeadingLevelRule(int32_t aLevel, RotorHeadingLevelRule::RotorHeadingLevelRule(int32_t aLevel,
const nsString& aSearchText) const nsString& aSearchText)
: RotorRoleRule(roles::HEADING, aSearchText), mLevel(aLevel){}; : RotorRoleRule(roles::HEADING, aSearchText), mLevel(aLevel) {};
uint16_t RotorHeadingLevelRule::Match(Accessible* aAcc) { uint16_t RotorHeadingLevelRule::Match(Accessible* aAcc) {
uint16_t result = RotorRoleRule::Match(aAcc); uint16_t result = RotorRoleRule::Match(aAcc);

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -136,7 +136,7 @@ class ElfPlainValue : public ElfValue {
unsigned int value; unsigned int value;
public: public:
ElfPlainValue(unsigned int val) : value(val){}; ElfPlainValue(unsigned int val) : value(val) {};
unsigned int getValue() { return value; } unsigned int getValue() { return value; }
}; };
@ -146,7 +146,7 @@ class ElfLocation : public ElfValue {
public: public:
enum position { ABSOLUTE, RELATIVE }; enum position { ABSOLUTE, RELATIVE };
ElfLocation() : section(nullptr), offset(0){}; ElfLocation() : section(nullptr), offset(0) {};
ElfLocation(ElfSection* section, unsigned int off, ElfLocation(ElfSection* section, unsigned int off,
enum position pos = RELATIVE); enum position pos = RELATIVE);
ElfLocation(unsigned int location, Elf* elf); ElfLocation(unsigned int location, Elf* elf);
@ -159,7 +159,7 @@ class ElfSize : public ElfValue {
ElfSection* section; ElfSection* section;
public: public:
ElfSize(ElfSection* s) : section(s){}; ElfSize(ElfSection* s) : section(s) {};
unsigned int getValue(); unsigned int getValue();
ElfSection* getSection() { return section; } ElfSection* getSection() { return section; }
}; };
@ -168,7 +168,7 @@ class ElfEntSize : public ElfValue {
ElfSection* section; ElfSection* section;
public: public:
ElfEntSize(ElfSection* s) : section(s){}; ElfEntSize(ElfSection* s) : section(s) {};
unsigned int getValue(); unsigned int getValue();
ElfSection* getSection() { return section; } ElfSection* getSection() { return section; }
}; };
@ -176,8 +176,8 @@ class ElfEntSize : public ElfValue {
template <typename T> template <typename T>
class serializable : public T::Type64 { class serializable : public T::Type64 {
public: public:
serializable(){}; serializable() {};
serializable(const typename T::Type64& p) : T::Type64(p){}; serializable(const typename T::Type64& p) : T::Type64(p) {};
private: private:
template <typename R> 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> { class Elf_Phdr : public serializable<Elf_Phdr_Traits> {
public: public:
Elf_Phdr(){}; Elf_Phdr() {};
Elf_Phdr(std::ifstream& file, unsigned char ei_class, unsigned char ei_data) 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) { bool contains(ElfSection* section) {
unsigned int size = section->getSize(); unsigned int size = section->getSize();
unsigned int addr = section->getAddr(); unsigned int addr = section->getAddr();
@ -563,10 +563,10 @@ class ElfSymtab_Section : public ElfSection {
class Elf_Rel : public serializable<Elf_Rel_Traits> { class Elf_Rel : public serializable<Elf_Rel_Traits> {
public: 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) 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 sh_type = SHT_REL;
static const unsigned int d_tag = DT_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> { class Elf_Rela : public serializable<Elf_Rela_Traits> {
public: 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) 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 sh_type = SHT_RELA;
static const unsigned int d_tag = DT_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() { inline unsigned int Elf::getSize() {
ElfSection* section; ElfSection* section;
for (section = shdr_section /* It's usually not far from the end */; 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(); 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; if (l > 1 && path[l - 1] == '.' && path[l - 2] == '/') path[l - 2] = 0;
while (*path == '/' && path[1] == '/') path++; 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) { if (cp && cp != path) {
*cp = '\0'; *cp = '\0';
if ((lstat(path, &sb) < 0 || !S_ISDIR(sb.st_mode)) && if ((lstat(path, &sb) < 0 || !S_ISDIR(sb.st_mode)) &&

View File

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

View File

@ -201,7 +201,7 @@ struct DeserializedStackFrame {
functionDisplayName(nullptr), functionDisplayName(nullptr),
isSystem(false), isSystem(false),
isSelfHosted(false), isSelfHosted(false),
owner(nullptr){}; owner(nullptr) {};
}; };
struct DeserializedStackFrame::HashPolicy { 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. // serializes it to disk, or memory, or a socket, etc.
class CoreDumpWriter { class CoreDumpWriter {
public: public:
virtual ~CoreDumpWriter(){}; virtual ~CoreDumpWriter() {};
// Write the given bits of metadata we would like to associate with this core // Write the given bits of metadata we would like to associate with this core
// dump. // dump.

View File

@ -317,7 +317,7 @@ using FieldSetterType = typename GetFieldSetterType<T>::SetterArg;
* remove fields of the wrong size. */ \ * remove fields of the wrong size. */ \
template <size_t Size> \ template <size_t Size> \
struct Fields : eachfield(MOZ_DECL_SYNCED_FIELD_INHERIT) \ 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 \ /* 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. \ * 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 * Called when an async panning/zooming transform has started being applied
* and passed the scroll offset * 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 * Called when an async panning/zooming transform is no longer applied
* and passed the scroll offset * 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) 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)) { if (IsAsciiDigit(*iter)) {
for (; iter != end && IsAsciiDigit(*iter); ++iter) for (; iter != end && IsAsciiDigit(*iter); ++iter);
;
} else if (*iter == char16_t('.')) { } else if (*iter == char16_t('.')) {
// Do nothing, jumps to fraction part // Do nothing, jumps to fraction part
} else { } else {
@ -67,8 +66,7 @@ static bool ParseFloat(const nsAString& aString, double& aDouble) {
return false; 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'))) { 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; return false;
} }
for (; iter != end && IsAsciiDigit(*iter); ++iter) for (; iter != end && IsAsciiDigit(*iter); ++iter);
;
} }
if (iter != end) { if (iter != end) {
@ -118,8 +115,7 @@ void ResponsiveImageSelector::ParseSourceSet(
// Extra commas at this point are a non-fatal syntax error. // Extra commas at this point are a non-fatal syntax error.
for (; iter != end && for (; iter != end &&
(nsContentUtils::IsHTMLWhitespace(*iter) || *iter == char16_t(',')); (nsContentUtils::IsHTMLWhitespace(*iter) || *iter == char16_t(','));
++iter) ++iter);
;
if (iter == end) { if (iter == end) {
break; break;
@ -128,8 +124,7 @@ void ResponsiveImageSelector::ParseSourceSet(
url = iter; url = iter;
// Find end of url // Find end of url
for (; iter != end && !nsContentUtils::IsHTMLWhitespace(*iter); ++iter) for (; iter != end && !nsContentUtils::IsHTMLWhitespace(*iter); ++iter);
;
// Omit trailing commas from URL. // Omit trailing commas from URL.
// Multiple commas are a non-fatal error. // 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 // there is no candidate type that uses all of these. This should generally
// match the mValue union of ResponsiveImageCandidate. // match the mValue union of ResponsiveImageCandidate.
struct ResponsiveImageDescriptors { struct ResponsiveImageDescriptors {
ResponsiveImageDescriptors() : mInvalid(false){}; ResponsiveImageDescriptors() : mInvalid(false) {};
Maybe<double> mDensity; Maybe<double> mDensity;
Maybe<int32_t> mWidth; Maybe<int32_t> mWidth;
@ -603,8 +598,7 @@ bool ResponsiveImageCandidate::ConsumeDescriptors(
// https://html.spec.whatwg.org/#parse-a-srcset-attribute // https://html.spec.whatwg.org/#parse-a-srcset-attribute
// Skip initial whitespace // Skip initial whitespace
for (; iter != end && nsContentUtils::IsHTMLWhitespace(*iter); ++iter) for (; iter != end && nsContentUtils::IsHTMLWhitespace(*iter); ++iter);
;
nsAString::const_iterator currentDescriptor = iter; nsAString::const_iterator currentDescriptor = iter;
@ -628,8 +622,7 @@ bool ResponsiveImageCandidate::ConsumeDescriptors(
// End of current descriptor, consume it, skip spaces // End of current descriptor, consume it, skip spaces
// ("After descriptor" state in spec) before continuing // ("After descriptor" state in spec) before continuing
descriptors.AddDescriptor(Substring(currentDescriptor, iter)); descriptors.AddDescriptor(Substring(currentDescriptor, iter));
for (; iter != end && nsContentUtils::IsHTMLWhitespace(*iter); ++iter) for (; iter != end && nsContentUtils::IsHTMLWhitespace(*iter); ++iter);
;
if (iter == end) { if (iter == end) {
break; break;
} }

View File

@ -27,8 +27,7 @@ TreeWalker::TreeWalker(nsINode* aRoot, uint32_t aWhatToShow,
NodeFilter* aFilter) NodeFilter* aFilter)
: nsTraversal(aRoot, aWhatToShow, aFilter), mCurrentNode(aRoot) {} : nsTraversal(aRoot, aWhatToShow, aFilter), mCurrentNode(aRoot) {}
TreeWalker::~TreeWalker() { /* destructor code */ TreeWalker::~TreeWalker() { /* destructor code */ }
}
/* /*
* nsISupports and cycle collection stuff * 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"); 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 * Tests if and how a node should be filtered. Uses mWhatToShow and

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -18,7 +18,7 @@ class LockRequestParent final : public PLockRequestParent {
NS_INLINE_DECL_REFCOUNTING(LockRequestParent) NS_INLINE_DECL_REFCOUNTING(LockRequestParent)
explicit LockRequestParent(const IPCLockRequest& aRequest) explicit LockRequestParent(const IPCLockRequest& aRequest)
: mRequest(aRequest){}; : mRequest(aRequest) {};
const IPCLockRequest& Data() { return mRequest; } 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 * Called when the DOMMediaStream has a live track added, either by
* script (addTrack()) or the source creating one. * 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 * Called when the DOMMediaStream removes a live track from playback, either
* by script (removeTrack(), track.stop()) or the source ending it. * 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. * Called when the DOMMediaStream has become active.
*/ */
virtual void NotifyActive(){}; virtual void NotifyActive() {};
/** /**
* Called when the DOMMediaStream has become inactive. * Called when the DOMMediaStream has become inactive.
*/ */
virtual void NotifyInactive(){}; virtual void NotifyInactive() {};
/** /**
* Called when the DOMMediaStream has become audible. * Called when the DOMMediaStream has become audible.
*/ */
virtual void NotifyAudible(){}; virtual void NotifyAudible() {};
/** /**
* Called when the DOMMediaStream has become inaudible. * Called when the DOMMediaStream has become inaudible.
*/ */
virtual void NotifyInaudible(){}; virtual void NotifyInaudible() {};
protected: protected:
virtual ~TrackListener() = default; virtual ~TrackListener() = default;

View File

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

View File

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

View File

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

View File

@ -173,7 +173,7 @@ class MediaStreamTrackSource : public nsISupports {
/** /**
* Same for GetSettings (no-op). * 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 * 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, * Unlike the "ended" event exposed to script this is called for any reason,
* including MediaStreamTrack::Stop(). * including MediaStreamTrack::Stop().
*/ */
virtual void NotifyEnded(MediaStreamTrack* aTrack){}; virtual void NotifyEnded(MediaStreamTrack* aTrack) {};
/** /**
* Called when the track's enabled state changes. * 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 // clang-format off

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -192,8 +192,8 @@ RefPtr<GenericNonExclusivePromise> RDDProcessManager::LaunchRDDProcess() {
} }
auto RDDProcessManager::EnsureRDDProcessAndCreateBridge( auto RDDProcessManager::EnsureRDDProcessAndCreateBridge(
base::ProcessId aOtherProcess, dom::ContentParentId aParentId) base::ProcessId aOtherProcess,
-> RefPtr<EnsureRDDPromise> { dom::ContentParentId aParentId) -> RefPtr<EnsureRDDPromise> {
return InvokeAsync( return InvokeAsync(
GetMainThreadSerialEventTarget(), __func__, GetMainThreadSerialEventTarget(), __func__,
[aOtherProcess, aParentId, this]() -> RefPtr<EnsureRDDPromise> { [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 // Override these methods if the inherited key source want to know the change
// for following attributes. For example, GeckoView would use these methods // for following attributes. For example, GeckoView would use these methods
// to notify change to the embedded application. // to notify change to the embedded application.
virtual void SetEnableFullScreen(bool aIsEnabled){}; virtual void SetEnableFullScreen(bool aIsEnabled) {};
virtual void SetEnablePictureInPictureMode(bool aIsEnabled){}; virtual void SetEnablePictureInPictureMode(bool aIsEnabled) {};
virtual void SetPositionState(const Maybe<PositionState>& aState){}; virtual void SetPositionState(const Maybe<PositionState>& aState) {};
protected: protected:
virtual ~MediaControlKeySource() = default; virtual ~MediaControlKeySource() = default;

View File

@ -70,10 +70,10 @@ class AudioDecoderInputTrack final : public ProcessedMediaTrack {
}; };
struct EOS {}; struct EOS {};
SPSCData() : mData(Empty()){}; SPSCData() : mData(Empty()) {};
explicit SPSCData(ClearFutureData&& aArg) : mData(std::move(aArg)){}; explicit SPSCData(ClearFutureData&& aArg) : mData(std::move(aArg)) {};
explicit SPSCData(DecodedData&& aArg) : mData(std::move(aArg)){}; explicit SPSCData(DecodedData&& aArg) : mData(std::move(aArg)) {};
explicit SPSCData(EOS&& aArg) : mData(std::move(aArg)){}; explicit SPSCData(EOS&& aArg) : mData(std::move(aArg)) {};
bool HasData() const { return !mData.is<Empty>(); } bool HasData() const { return !mData.is<Empty>(); }
bool IsClearFutureData() const { return mData.is<ClearFutureData>(); } 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 // Single frame rendering operation may need to be done before playback
// started (1st frame) or right after seek completed or playback stopped. // 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. // 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 // 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 // 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>; using MapType = AutoTArray<ElementType, 16>;
public: public:
SimpleMap() : mLock("SimpleMap"){}; SimpleMap() : mLock("SimpleMap") {};
// Check if aKey is in the map. // Check if aKey is in the map.
bool Contains(const K& aKey) { bool Contains(const K& aKey) {

View File

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

View File

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

View File

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

View File

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

View File

@ -51,8 +51,8 @@ void RemoteTrackSource::Destroy() {
} }
auto RemoteTrackSource::ApplyConstraints( auto RemoteTrackSource::ApplyConstraints(
const dom::MediaTrackConstraints& aConstraints, dom::CallerType aCallerType) const dom::MediaTrackConstraints& aConstraints,
-> RefPtr<ApplyConstraintsPromise> { dom::CallerType aCallerType) -> RefPtr<ApplyConstraintsPromise> {
return ApplyConstraintsPromise::CreateAndReject( return ApplyConstraintsPromise::CreateAndReject(
MakeRefPtr<MediaMgrError>( MakeRefPtr<MediaMgrError>(
dom::MediaStreamError::Name::OverconstrainedError, ""), 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 // Note: we always keep the most recent SDP
} }
auto WebrtcGlobalStatsHistory::InitHistory(const nsAString& aPcId, auto WebrtcGlobalStatsHistory::InitHistory(
const bool aIsLongTermStatsDisabled) const nsAString& aPcId, const bool aIsLongTermStatsDisabled) -> void {
-> void {
MOZ_ASSERT(XRE_IsParentProcess()); MOZ_ASSERT(XRE_IsParentProcess());
if (WebrtcGlobalStatsHistory::Get().MaybeGet(aPcId)) { if (WebrtcGlobalStatsHistory::Get().MaybeGet(aPcId)) {
return; return;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -301,7 +301,7 @@ class nsXMLContentSerializer : public nsIContentSerializer {
* the serialization of the end tag. * the serialization of the end tag.
* (called at the end of AppendElementStart) * (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 * 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> { struct ValueWithSize : LinkedListElement<ValueWithSize> {
ValueWithSize(JS::Handle<JS::Value> aValue, double aSize) ValueWithSize(JS::Handle<JS::Value> aValue, double aSize)
: mValue(aValue), mSize(aSize){}; : mValue(aValue), mSize(aSize) {};
JS::Heap<JS::Value> mValue; JS::Heap<JS::Value> mValue;
double mSize = 0.0f; 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 // Only visible for SVGGraphicElement, so it's a no-op here, and that
// subclass has the useful implementation. // subclass has the useful implementation.
virtual void SetAnimateMotionTransform( virtual void SetAnimateMotionTransform(
const mozilla::gfx::Matrix* aMatrix) { /*no-op*/ const mozilla::gfx::Matrix* aMatrix) { /*no-op*/ }
}
virtual const mozilla::gfx::Matrix* GetAnimateMotionTransform() const { virtual const mozilla::gfx::Matrix* GetAnimateMotionTransform() const {
return nullptr; return nullptr;
} }

View File

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

View File

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

View File

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

View File

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

View File

@ -16,7 +16,7 @@ class ErrorObserver {
/** /**
* Default Destructor for ErrorObserver * Default Destructor for ErrorObserver
**/ **/
virtual ~ErrorObserver(){}; virtual ~ErrorObserver() {};
/** /**
* Notifies this Error observer of a new error aRes * 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 \ #define CSS_EQUIV_TABLE_NONE {CSSEditUtils::eCSSEditableProperty_NONE, 0}
{ CSSEditUtils::eCSSEditableProperty_NONE, 0 }
const CSSEditUtils::CSSEquivTable boldEquivTable[] = { const CSSEditUtils::CSSEquivTable boldEquivTable[] = {
{CSSEditUtils::eCSSEditableProperty_font_weight, true, false, ProcessBValue, {CSSEditUtils::eCSSEditableProperty_font_weight, true, false, ProcessBValue,

View File

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

View File

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

View File

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

View File

@ -287,7 +287,7 @@ void InternetCiter::Rewrap(const nsAString& aInString, uint32_t aWrapCol,
BreakLine(aOutString, outStringCol, citeLevel); BreakLine(aOutString, outStringCol, citeLevel);
} }
} // end inner loop within one line of aInString } // end inner loop within one line of aInString
} // end outer loop over lines of aInString } // end outer loop over lines of aInString
} }
} // namespace mozilla } // 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_CONTEXT ((gss_ctx_id_t)0)
#define GSS_C_NO_CREDENTIAL ((gss_cred_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_NO_CHANNEL_BINDINGS ((gss_channel_bindings_t)0)
#define GSS_C_EMPTY_BUFFER \ #define GSS_C_EMPTY_BUFFER {0, nullptr}
{ 0, nullptr }
/* /*
* Some alternate names for a couple of the above * Some alternate names for a couple of the above

View File

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

View File

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

View File

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

View File

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

View File

@ -55,14 +55,14 @@ class AxisPhysicsModel {
protected: protected:
struct State { struct State {
State(double ap, double av) : p(ap), v(av){}; State(double ap, double av) : p(ap), v(av) {};
double p; // Position double p; // Position
double v; // Velocity double v; // Velocity
}; };
struct Derivative { struct Derivative {
Derivative() : dp(0.0), dv(0.0){}; Derivative() : dp(0.0), dv(0.0) {};
Derivative(double aDp, double aDv) : dp(aDp), dv(aDv){}; Derivative(double aDp, double aDv) : dp(aDp), dv(aDv) {};
double dp; // dp / delta time = Position double dp; // dp / delta time = Position
double dv; // dv / delta time = Velocity 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. * ForEachNode pre-order traversal, using TraversalFlag.
*/ */
template <typename Iterator, typename Node, typename PreAction> template <typename Iterator, typename Node, typename PreAction>
auto ForEachNode(Node aRoot, const PreAction& aPreAction) -> std::enable_if_t< auto ForEachNode(Node aRoot, const PreAction& aPreAction)
std::is_same_v<decltype(aPreAction(aRoot)), TraversalFlag>, bool> { -> std::enable_if_t<
std::is_same_v<decltype(aPreAction(aRoot)), TraversalFlag>, bool> {
return ForEachNode<Iterator>( return ForEachNode<Iterator>(
aRoot, aPreAction, [](Node aNode) { return TraversalFlag::Continue; }); 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) auto ForEachNodePostOrder(Node aRoot, const PostAction& aPostAction)
-> std::enable_if_t<std::is_same_v<decltype(aPostAction(aRoot)), void>, -> std::enable_if_t<std::is_same_v<decltype(aPostAction(aRoot)), void>,
void> { void> {
ForEachNode<Iterator>( ForEachNode<Iterator>(aRoot, [](Node aNode) {}, aPostAction);
aRoot, [](Node aNode) {}, aPostAction);
} }
/* /*

View File

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

View File

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

View File

@ -158,8 +158,7 @@ TEST_F(APZEventRegionsTesterMock, HitRegionImmediateResponse) {
nsTArray<ScrollableLayerGuid> targets; nsTArray<ScrollableLayerGuid> targets;
targets.AppendElement(left->GetGuid()); targets.AppendElement(left->GetGuid());
manager->SetTargetAPZC(result.mInputBlockId, targets); manager->SetTargetAPZC(result.mInputBlockId, targets);
while (mcc->RunThroughDelayedTasks()) while (mcc->RunThroughDelayedTasks()); // this runs the tap event
; // this runs the tap event
check.Call("Tapped on left this time"); 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 // Clear out any remaining fling animation and pending tasks
apzc->AdvanceAnimationsUntilEnd(); apzc->AdvanceAnimationsUntilEnd();
while (mcc->RunThroughDelayedTasks()) while (mcc->RunThroughDelayedTasks());
;
apzc->AssertStateIsReset(); apzc->AssertStateIsReset();
} }
#endif #endif
@ -225,8 +224,7 @@ TEST_F(APZCGestureDetectorTester, Pan_With_Tap) {
// Clear out any remaining fling animation and pending tasks // Clear out any remaining fling animation and pending tasks
apzc->AdvanceAnimationsUntilEnd(); apzc->AdvanceAnimationsUntilEnd();
while (mcc->RunThroughDelayedTasks()) while (mcc->RunThroughDelayedTasks());
;
apzc->AssertStateIsReset(); apzc->AssertStateIsReset();
} }
@ -286,14 +284,12 @@ class APZCFlingStopTester : public APZCGestureDetectorTester {
HandleTap(TapType::eSingleTap, _, 0, apzc->GetGuid(), _, _)) HandleTap(TapType::eSingleTap, _, 0, apzc->GetGuid(), _, _))
.Times(tapCallsExpected); .Times(tapCallsExpected);
Tap(apzc, ScreenIntPoint(10, 10), 0); Tap(apzc, ScreenIntPoint(10, 10), 0);
while (mcc->RunThroughDelayedTasks()) while (mcc->RunThroughDelayedTasks());
;
// Deliver another tap, to make sure that taps are flowing properly once // Deliver another tap, to make sure that taps are flowing properly once
// the fling is aborted. // the fling is aborted.
Tap(apzc, ScreenIntPoint(100, 100), 0); 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 // Verify that we didn't advance any further after the fling was aborted, in
// either case. // either case.
@ -847,8 +843,7 @@ TEST_F(APZCGestureDetectorTester, TapTimeoutInterruptedByWheel) {
Wheel(apzc, ScreenIntPoint(10, 10), ScreenPoint(0, -10), mcc->Time()) Wheel(apzc, ScreenIntPoint(10, 10), ScreenPoint(0, -10), mcc->Time())
.mInputBlockId; .mInputBlockId;
EXPECT_NE(result.mInputBlockId, wheelBlockId); EXPECT_NE(result.mInputBlockId, wheelBlockId);
while (mcc->RunThroughDelayedTasks()) while (mcc->RunThroughDelayedTasks());
;
} }
TEST_F(APZCGestureDetectorTester, LongPressWithInputQueueDelay) { TEST_F(APZCGestureDetectorTester, LongPressWithInputQueueDelay) {

View File

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

View File

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

View File

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

View File

@ -85,7 +85,7 @@ class gfxSingleFaceMacFontFamily final : public gfxFontFamily {
virtual ~gfxSingleFaceMacFontFamily() = default; virtual ~gfxSingleFaceMacFontFamily() = default;
void FindStyleVariationsLocked(FontInfoData* aFontInfoData = nullptr) void FindStyleVariationsLocked(FontInfoData* aFontInfoData = nullptr)
MOZ_REQUIRES(mLock) override{}; MOZ_REQUIRES(mLock) override {};
void LocalizedName(nsACString& aLocalizedName) 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. // Helper to find the previous index in the points array, walking backward.
#define PREV_POINT(idx) \ #define PREV_POINT(idx) \
({ \ ({ \
int cur = (idx)-1; \ int cur = (idx) - 1; \
cur >= 0 ? cur : nump - 1; \ cur >= 0 ? cur : nump - 1; \
}) })
// Start looking for "left"-side and "right"-side descending edges starting // 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" #define IOKIT_FRAMEWORK_PATH "/System/Library/Frameworks/IOKit.framework/IOKit"
#ifndef kIOPSTimeRemainingUnknown #ifndef kIOPSTimeRemainingUnknown
# define kIOPSTimeRemainingUnknown ((CFTimeInterval)-1.0) # define kIOPSTimeRemainingUnknown ((CFTimeInterval) - 1.0)
#endif #endif
#ifndef kIOPSTimeRemainingUnlimited #ifndef kIOPSTimeRemainingUnlimited
# define kIOPSTimeRemainingUnlimited ((CFTimeInterval)-2.0) # define kIOPSTimeRemainingUnlimited ((CFTimeInterval) - 2.0)
#endif #endif
using namespace mozilla::dom::battery; using namespace mozilla::dom::battery;

View File

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

View File

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

View File

@ -276,11 +276,9 @@ NS_IMPL_ISUPPORTS_INHERITED(ImageDecoderHelper, Runnable,
NS_IMPL_ISUPPORTS(imgTools, imgITools) 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 NS_IMETHODIMP
imgTools::DecodeImageFromArrayBuffer(JS::Handle<JS::Value> aArrayBuffer, imgTools::DecodeImageFromArrayBuffer(JS::Handle<JS::Value> aArrayBuffer,

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -452,6 +452,6 @@ struct JSFunctionSpec {
#define JS_SYM_FNSPEC(symbol, call, info, nargs, flags, selfHostedName) \ #define JS_SYM_FNSPEC(symbol, call, info, nargs, flags, selfHostedName) \
JS_FNSPEC(::JS::SymbolCode::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) \ #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 #endif // js_PropertySpec_h

View File

@ -95,7 +95,7 @@ extern JS_PUBLIC_API uint32_t GetThreadType(void);
# else # else
inline bool InitThreadType(void) { return true; } 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 GetThreadType(void) { return 0; }
inline uint32_t GetAllocationThreadType(void) { return 0; } inline uint32_t GetAllocationThreadType(void) { return 0; }
inline uint32_t GetStackCheckThreadType(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