зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1237151 (part 3) - Remove ignored qualifiers in all remaining code. r=froydnj.
This commit is contained in:
Родитель
71ba19f700
Коммит
ec89bbf7f2
|
@ -49,8 +49,8 @@ public:
|
|||
DOMHighResTimeStamp GetTime() const { return mTime; }
|
||||
MarkerTracingType GetTracingType() const { return mTracingType; }
|
||||
|
||||
const uint8_t GetProcessType() const { return mProcessType; };
|
||||
const bool IsOffMainThread() const { return mIsOffMainThread; };
|
||||
uint8_t GetProcessType() const { return mProcessType; };
|
||||
bool IsOffMainThread() const { return mIsOffMainThread; };
|
||||
|
||||
private:
|
||||
const char* mName;
|
||||
|
|
|
@ -93,7 +93,7 @@ class Gamepad {
|
|||
// Index given by our superclass.
|
||||
uint32_t mSuperIndex;
|
||||
|
||||
const bool isDpad(IOHIDElementRef element) const
|
||||
bool isDpad(IOHIDElementRef element) const
|
||||
{
|
||||
return element == mDpad;
|
||||
}
|
||||
|
|
|
@ -103,7 +103,7 @@ InputPortData::GetId() const
|
|||
return mId;
|
||||
}
|
||||
|
||||
const InputPortType
|
||||
InputPortType
|
||||
InputPortData::GetType() const
|
||||
{
|
||||
return ToInputPortType(mType);
|
||||
|
|
|
@ -33,7 +33,7 @@ public:
|
|||
|
||||
const nsString& GetId() const;
|
||||
|
||||
const InputPortType GetType() const;
|
||||
InputPortType GetType() const;
|
||||
|
||||
private:
|
||||
~InputPortData();
|
||||
|
|
|
@ -17,7 +17,7 @@ class AndroidMediaDecoder : public MediaDecoder
|
|||
public:
|
||||
AndroidMediaDecoder(MediaDecoderOwner* aOwner, const nsACString& aType);
|
||||
|
||||
const nsresult GetContentType(nsACString& aType) const {
|
||||
nsresult GetContentType(nsACString& aType) const {
|
||||
aType = mType;
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
|
@ -805,7 +805,7 @@ public:
|
|||
private:
|
||||
uint8_t* GetPointer() { return mData + mOffset; }
|
||||
|
||||
const size_t AvailableSize() { return mCapicity - mOffset; }
|
||||
size_t AvailableSize() const { return mCapicity - mOffset; }
|
||||
|
||||
void IncreaseOffset(size_t aValue)
|
||||
{
|
||||
|
@ -814,12 +814,12 @@ private:
|
|||
mOffset += aValue;
|
||||
}
|
||||
|
||||
bool IsEmpty()
|
||||
bool IsEmpty() const
|
||||
{
|
||||
return (mOffset == 0);
|
||||
}
|
||||
|
||||
const size_t GetCapacity()
|
||||
size_t GetCapacity() const
|
||||
{
|
||||
return mCapicity;
|
||||
}
|
||||
|
|
|
@ -344,7 +344,7 @@ protected:
|
|||
}
|
||||
}
|
||||
|
||||
static const NotificationDirection StringToDirection(const nsAString& aDirection)
|
||||
static NotificationDirection StringToDirection(const nsAString& aDirection)
|
||||
{
|
||||
if (aDirection.EqualsLiteral("ltr")) {
|
||||
return NotificationDirection::Ltr;
|
||||
|
|
|
@ -120,7 +120,7 @@ typedef mozilla::null_t DXGISharedSurfaceHandle;
|
|||
// XXX maybe not the best place for these. better one?
|
||||
|
||||
#define VARSTR(v_) case v_: return #v_
|
||||
inline const char* const
|
||||
inline const char*
|
||||
NPPVariableToString(NPPVariable aVar)
|
||||
{
|
||||
switch (aVar) {
|
||||
|
|
|
@ -86,12 +86,12 @@ private:
|
|||
return mAddress;
|
||||
}
|
||||
|
||||
const uint16_t Port() const
|
||||
uint16_t Port() const
|
||||
{
|
||||
return mPort;
|
||||
}
|
||||
|
||||
const DeviceState State() const
|
||||
DeviceState State() const
|
||||
{
|
||||
return mState;
|
||||
}
|
||||
|
|
|
@ -72,7 +72,7 @@ GetZeroValueForUnit(StyleAnimationValue::Unit aUnit)
|
|||
// with a eUnit_Float value. (See comment below.)
|
||||
//
|
||||
// Returns true on success, or false.
|
||||
static const bool
|
||||
static bool
|
||||
FinalizeStyleAnimationValues(const StyleAnimationValue*& aValue1,
|
||||
const StyleAnimationValue*& aValue2)
|
||||
{
|
||||
|
|
|
@ -134,7 +134,7 @@ protected:
|
|||
|
||||
// Interface for SVGMatrix's use
|
||||
friend class dom::SVGMatrix;
|
||||
const bool IsAnimVal() const {
|
||||
bool IsAnimVal() const {
|
||||
return mIsAnimValItem;
|
||||
}
|
||||
const gfxMatrix& Matrixgfx() const {
|
||||
|
|
|
@ -43,7 +43,7 @@ public:
|
|||
return CallCreateInstance(NS_DIALOGPARAMBLOCK_CONTRACTID, &mBlock);
|
||||
}
|
||||
nsIDialogParamBlock * operator->() const MOZ_NO_ADDREF_RELEASE_ON_RETURN { return mBlock; }
|
||||
operator nsIDialogParamBlock * const () { return mBlock; }
|
||||
operator nsIDialogParamBlock * () const { return mBlock; }
|
||||
|
||||
private:
|
||||
nsIDialogParamBlock *mBlock;
|
||||
|
|
|
@ -941,7 +941,7 @@ Layer::ApplyPendingUpdatesForThisTransaction()
|
|||
}
|
||||
}
|
||||
|
||||
const float
|
||||
float
|
||||
Layer::GetLocalOpacity()
|
||||
{
|
||||
float opacity = mOpacity;
|
||||
|
|
|
@ -1354,7 +1354,7 @@ public:
|
|||
* Returns the local opacity for this layer: either mOpacity or,
|
||||
* for shadow layers, GetShadowOpacity()
|
||||
*/
|
||||
const float GetLocalOpacity();
|
||||
float GetLocalOpacity();
|
||||
|
||||
/**
|
||||
* DRAWING PHASE ONLY
|
||||
|
@ -1637,7 +1637,7 @@ public:
|
|||
* marked as needed to be recomposited.
|
||||
*/
|
||||
const nsIntRegion& GetInvalidRegion() { return mInvalidRegion; }
|
||||
const void AddInvalidRegion(const nsIntRegion& aRegion) {
|
||||
void AddInvalidRegion(const nsIntRegion& aRegion) {
|
||||
mInvalidRegion.Or(mInvalidRegion, aRegion);
|
||||
}
|
||||
|
||||
|
|
|
@ -92,11 +92,11 @@ void mozilla_dump_image(void* bytes, int width, int height, int bytepp,
|
|||
|
||||
}
|
||||
|
||||
static const uint8_t PremultiplyValue(uint8_t a, uint8_t v) {
|
||||
static uint8_t PremultiplyValue(uint8_t a, uint8_t v) {
|
||||
return gfxUtils::sPremultiplyTable[a*256+v];
|
||||
}
|
||||
|
||||
static const uint8_t UnpremultiplyValue(uint8_t a, uint8_t v) {
|
||||
static uint8_t UnpremultiplyValue(uint8_t a, uint8_t v) {
|
||||
return gfxUtils::sUnpremultiplyTable[a*256+v];
|
||||
}
|
||||
|
||||
|
|
|
@ -194,7 +194,7 @@ class Message : public Pickle {
|
|||
header()->seqno = aSeqno;
|
||||
}
|
||||
|
||||
const char* const name() const {
|
||||
const char* name() const {
|
||||
return name_;
|
||||
}
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ class MessageIterator {
|
|||
NOTREACHED();
|
||||
return val;
|
||||
}
|
||||
const void NextData(const char** data, int* length) const {
|
||||
void NextData(const char** data, int* length) const {
|
||||
if (!msg_.ReadData(&iter_, data, length)) {
|
||||
NOTREACHED();
|
||||
}
|
||||
|
|
|
@ -577,7 +577,7 @@ def _cxxConstPtrToType(ipdltype, side):
|
|||
t.ptrconstptr = 1
|
||||
return t
|
||||
t.const = 1
|
||||
t.ptrconst = 1
|
||||
t.ptr = 1
|
||||
return t
|
||||
|
||||
def _allocMethod(ptype, side):
|
||||
|
|
|
@ -403,18 +403,18 @@ public:
|
|||
/**
|
||||
* Get the default colors
|
||||
*/
|
||||
const nscolor DefaultColor() const { return mDefaultColor; }
|
||||
const nscolor DefaultBackgroundColor() const { return mBackgroundColor; }
|
||||
const nscolor DefaultLinkColor() const { return mLinkColor; }
|
||||
const nscolor DefaultActiveLinkColor() const { return mActiveLinkColor; }
|
||||
const nscolor DefaultVisitedLinkColor() const { return mVisitedLinkColor; }
|
||||
const nscolor FocusBackgroundColor() const { return mFocusBackgroundColor; }
|
||||
const nscolor FocusTextColor() const { return mFocusTextColor; }
|
||||
nscolor DefaultColor() const { return mDefaultColor; }
|
||||
nscolor DefaultBackgroundColor() const { return mBackgroundColor; }
|
||||
nscolor DefaultLinkColor() const { return mLinkColor; }
|
||||
nscolor DefaultActiveLinkColor() const { return mActiveLinkColor; }
|
||||
nscolor DefaultVisitedLinkColor() const { return mVisitedLinkColor; }
|
||||
nscolor FocusBackgroundColor() const { return mFocusBackgroundColor; }
|
||||
nscolor FocusTextColor() const { return mFocusTextColor; }
|
||||
|
||||
/**
|
||||
* Body text color, for use in quirks mode only.
|
||||
*/
|
||||
const nscolor BodyTextColor() const { return mBodyTextColor; }
|
||||
nscolor BodyTextColor() const { return mBodyTextColor; }
|
||||
void SetBodyTextColor(nscolor aColor) { mBodyTextColor = aColor; }
|
||||
|
||||
bool GetUseFocusColors() const { return mUseFocusColors; }
|
||||
|
|
|
@ -321,7 +321,7 @@ private:
|
|||
}
|
||||
|
||||
// Return true if aName exists at aIndex.
|
||||
const bool Contains(uint32_t aIndex, const nsString& aName) const
|
||||
bool Contains(uint32_t aIndex, const nsString& aName) const
|
||||
{
|
||||
if (!mHasRepeatAuto) {
|
||||
return mLineNameLists[aIndex].Contains(aName);
|
||||
|
|
|
@ -239,18 +239,18 @@ private:
|
|||
}
|
||||
|
||||
/* Returns offset + length */
|
||||
const off_t endOffset() const {
|
||||
off_t endOffset() const {
|
||||
return offset + length;
|
||||
}
|
||||
|
||||
/* Returns the offset corresponding to the given address */
|
||||
const off_t offsetOf(const void *ptr) const {
|
||||
off_t offsetOf(const void *ptr) const {
|
||||
return reinterpret_cast<uintptr_t>(ptr)
|
||||
- reinterpret_cast<uintptr_t>(addr) + offset;
|
||||
}
|
||||
|
||||
/* Returns whether the given address is in the LazyMap range */
|
||||
const bool Contains(const void *ptr) const {
|
||||
bool Contains(const void *ptr) const {
|
||||
return (ptr >= addr) && (ptr < end());
|
||||
}
|
||||
};
|
||||
|
|
|
@ -77,18 +77,18 @@ public:
|
|||
bool DecompressChunk(void *where, size_t chunk, size_t length = 0);
|
||||
|
||||
/* Returns the uncompressed size of the complete zstream */
|
||||
const size_t GetUncompressedSize() const
|
||||
size_t GetUncompressedSize() const
|
||||
{
|
||||
return (offsetTable.numElements() - 1) * chunkSize + lastChunkSize;
|
||||
}
|
||||
|
||||
/* Returns the chunk size of the given chunk */
|
||||
const size_t GetChunkSize(size_t chunk = 0) const {
|
||||
size_t GetChunkSize(size_t chunk = 0) const {
|
||||
return (chunk == offsetTable.numElements() - 1) ? lastChunkSize : chunkSize;
|
||||
}
|
||||
|
||||
/* Returns the number of chunks */
|
||||
const size_t GetChunksNum() const {
|
||||
size_t GetChunksNum() const {
|
||||
return offsetTable.numElements();
|
||||
}
|
||||
|
||||
|
|
|
@ -240,7 +240,7 @@ CacheObserver::AttachToPreferences()
|
|||
}
|
||||
|
||||
// static
|
||||
uint32_t const CacheObserver::MemoryCacheCapacity()
|
||||
uint32_t CacheObserver::MemoryCacheCapacity()
|
||||
{
|
||||
if (sMemoryCacheCapacity >= 0)
|
||||
return sMemoryCacheCapacity << 10;
|
||||
|
@ -278,7 +278,7 @@ uint32_t const CacheObserver::MemoryCacheCapacity()
|
|||
}
|
||||
|
||||
// static
|
||||
bool const CacheObserver::UseNewCache()
|
||||
bool CacheObserver::UseNewCache()
|
||||
{
|
||||
uint32_t useNewCache = sUseNewCache;
|
||||
|
||||
|
@ -441,7 +441,7 @@ nsresult Run(NeckoOriginAttributes const &aOa)
|
|||
} // anon
|
||||
|
||||
// static
|
||||
bool const CacheObserver::EntryIsTooBig(int64_t aSize, bool aUsingDisk)
|
||||
bool CacheObserver::EntryIsTooBig(int64_t aSize, bool aUsingDisk)
|
||||
{
|
||||
// If custom limit is set, check it.
|
||||
int64_t preferredLimit = aUsingDisk ? sMaxDiskEntrySize : sMaxMemoryEntrySize;
|
||||
|
|
|
@ -27,49 +27,49 @@ class CacheObserver : public nsIObserver
|
|||
static CacheObserver* Self() { return sSelf; }
|
||||
|
||||
// Access to preferences
|
||||
static bool const UseNewCache();
|
||||
static bool const UseDiskCache()
|
||||
static bool UseNewCache();
|
||||
static bool UseDiskCache()
|
||||
{ return sUseDiskCache; }
|
||||
static bool const UseMemoryCache()
|
||||
static bool UseMemoryCache()
|
||||
{ return sUseMemoryCache; }
|
||||
static uint32_t const MetadataMemoryLimit() // result in bytes.
|
||||
static uint32_t MetadataMemoryLimit() // result in bytes.
|
||||
{ return sMetadataMemoryLimit << 10; }
|
||||
static uint32_t const MemoryCacheCapacity(); // result in bytes.
|
||||
static uint32_t const DiskCacheCapacity() // result in bytes.
|
||||
static uint32_t MemoryCacheCapacity(); // result in bytes.
|
||||
static uint32_t DiskCacheCapacity() // result in bytes.
|
||||
{ return sDiskCacheCapacity << 10; }
|
||||
static void SetDiskCacheCapacity(uint32_t); // parameter in bytes.
|
||||
static uint32_t const DiskFreeSpaceSoftLimit() // result in bytes.
|
||||
static uint32_t DiskFreeSpaceSoftLimit() // result in bytes.
|
||||
{ return sDiskFreeSpaceSoftLimit << 10; }
|
||||
static uint32_t const DiskFreeSpaceHardLimit() // result in bytes.
|
||||
static uint32_t DiskFreeSpaceHardLimit() // result in bytes.
|
||||
{ return sDiskFreeSpaceHardLimit << 10; }
|
||||
static bool const SmartCacheSizeEnabled()
|
||||
static bool SmartCacheSizeEnabled()
|
||||
{ return sSmartCacheSizeEnabled; }
|
||||
static uint32_t const PreloadChunkCount()
|
||||
static uint32_t PreloadChunkCount()
|
||||
{ return sPreloadChunkCount; }
|
||||
static uint32_t const MaxMemoryEntrySize() // result in bytes.
|
||||
static uint32_t MaxMemoryEntrySize() // result in bytes.
|
||||
{ return sMaxMemoryEntrySize << 10; }
|
||||
static uint32_t const MaxDiskEntrySize() // result in bytes.
|
||||
static uint32_t MaxDiskEntrySize() // result in bytes.
|
||||
{ return sMaxDiskEntrySize << 10; }
|
||||
static uint32_t const MaxDiskChunksMemoryUsage(bool aPriority) // result in bytes.
|
||||
static uint32_t MaxDiskChunksMemoryUsage(bool aPriority) // result in bytes.
|
||||
{ return aPriority ? sMaxDiskPriorityChunksMemoryUsage << 10
|
||||
: sMaxDiskChunksMemoryUsage << 10; }
|
||||
static uint32_t const CompressionLevel()
|
||||
static uint32_t CompressionLevel()
|
||||
{ return sCompressionLevel; }
|
||||
static uint32_t const HalfLifeSeconds()
|
||||
static uint32_t HalfLifeSeconds()
|
||||
{ return sHalfLifeHours * 60.0F * 60.0F; }
|
||||
static int32_t const HalfLifeExperiment()
|
||||
static int32_t HalfLifeExperiment()
|
||||
{ return sHalfLifeExperiment; }
|
||||
static bool const ClearCacheOnShutdown()
|
||||
static bool ClearCacheOnShutdown()
|
||||
{ return sSanitizeOnShutdown && sClearCacheOnShutdown; }
|
||||
static bool const CacheFSReported()
|
||||
static bool CacheFSReported()
|
||||
{ return sCacheFSReported; }
|
||||
static void SetCacheFSReported();
|
||||
static bool const HashStatsReported()
|
||||
static bool HashStatsReported()
|
||||
{ return sHashStatsReported; }
|
||||
static void SetHashStatsReported();
|
||||
static void ParentDirOverride(nsIFile ** aDir);
|
||||
|
||||
static bool const EntryIsTooBig(int64_t aSize, bool aUsingDisk);
|
||||
static bool EntryIsTooBig(int64_t aSize, bool aUsingDisk);
|
||||
|
||||
private:
|
||||
static CacheObserver* sSelf;
|
||||
|
|
|
@ -88,7 +88,7 @@ CacheStorageService::MemoryPool::~MemoryPool()
|
|||
}
|
||||
}
|
||||
|
||||
uint32_t const
|
||||
uint32_t
|
||||
CacheStorageService::MemoryPool::Limit() const
|
||||
{
|
||||
switch (mType) {
|
||||
|
|
|
@ -324,7 +324,7 @@ private:
|
|||
void PurgeAll(uint32_t aWhat);
|
||||
|
||||
private:
|
||||
uint32_t const Limit() const;
|
||||
uint32_t Limit() const;
|
||||
MemoryPool() = delete;
|
||||
};
|
||||
|
||||
|
|
|
@ -1684,7 +1684,7 @@ ExtractCharsetFromXmlDeclaration(const unsigned char* aBytes, int32_t aLen,
|
|||
return !oCharset.IsEmpty();
|
||||
}
|
||||
|
||||
inline const char
|
||||
inline char
|
||||
GetNextChar(nsACString::const_iterator& aStart,
|
||||
nsACString::const_iterator& aEnd)
|
||||
{
|
||||
|
|
|
@ -46,7 +46,7 @@ public:
|
|||
/**
|
||||
* @return the number of elemets the array contains.
|
||||
*/
|
||||
const size_type length() const { return mArray.Length(); }
|
||||
size_type length() const { return mArray.Length(); }
|
||||
|
||||
class iterator {
|
||||
public:
|
||||
|
|
|
@ -84,7 +84,7 @@ struct ScopedArrayBufferContentsTraits {
|
|||
type result = {0, 0};
|
||||
return result;
|
||||
}
|
||||
const static void release(type ptr) {
|
||||
static void release(type ptr) {
|
||||
js_free(ptr.data);
|
||||
ptr.data = nullptr;
|
||||
ptr.nbytes = 0;
|
||||
|
|
|
@ -27,7 +27,7 @@ public:
|
|||
GonkAutoMounter();
|
||||
~GonkAutoMounter();
|
||||
|
||||
const MountAccess GetAccess()
|
||||
MountAccess GetAccess() const
|
||||
{
|
||||
return mAccess;
|
||||
}
|
||||
|
|
|
@ -77,7 +77,7 @@ class UniqueString {
|
|||
const char* str_;
|
||||
};
|
||||
|
||||
const char* const FromUniqueString(const UniqueString* ustr)
|
||||
const char* FromUniqueString(const UniqueString* ustr)
|
||||
{
|
||||
return ustr->str_;
|
||||
}
|
||||
|
|
|
@ -85,7 +85,7 @@ using std::map;
|
|||
class UniqueString;
|
||||
|
||||
// Get the contained C string (debugging only)
|
||||
const char* const FromUniqueString(const UniqueString*);
|
||||
const char* FromUniqueString(const UniqueString*);
|
||||
|
||||
// Is the given string empty (that is, "") ?
|
||||
bool IsEmptyUniqueString(const UniqueString*);
|
||||
|
|
|
@ -1803,7 +1803,7 @@ void CallFrameInfo::Reporter::ClearingCFARule(uint64 offset,
|
|||
}
|
||||
|
||||
|
||||
const unsigned int DwarfCFIToModule::RegisterNames::I386() {
|
||||
unsigned int DwarfCFIToModule::RegisterNames::I386() {
|
||||
/*
|
||||
8 "$eax", "$ecx", "$edx", "$ebx", "$esp", "$ebp", "$esi", "$edi",
|
||||
3 "$eip", "$eflags", "$unused1",
|
||||
|
@ -1818,7 +1818,7 @@ const unsigned int DwarfCFIToModule::RegisterNames::I386() {
|
|||
return 8 + 3 + 8 + 2 + 8 + 8 + 3 + 8 + 2;
|
||||
}
|
||||
|
||||
const unsigned int DwarfCFIToModule::RegisterNames::X86_64() {
|
||||
unsigned int DwarfCFIToModule::RegisterNames::X86_64() {
|
||||
/*
|
||||
8 "$rax", "$rdx", "$rcx", "$rbx", "$rsi", "$rdi", "$rbp", "$rsp",
|
||||
8 "$r8", "$r9", "$r10", "$r11", "$r12", "$r13", "$r14", "$r15",
|
||||
|
@ -1837,7 +1837,7 @@ const unsigned int DwarfCFIToModule::RegisterNames::X86_64() {
|
|||
}
|
||||
|
||||
// Per ARM IHI 0040A, section 3.1
|
||||
const unsigned int DwarfCFIToModule::RegisterNames::ARM() {
|
||||
unsigned int DwarfCFIToModule::RegisterNames::ARM() {
|
||||
/*
|
||||
8 "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",
|
||||
8 "r8", "r9", "r10", "r11", "r12", "sp", "lr", "pc",
|
||||
|
|
|
@ -1203,13 +1203,13 @@ class DwarfCFIToModule: public CallFrameInfo::Handler {
|
|||
class RegisterNames {
|
||||
public:
|
||||
// Intel's "x86" or IA-32.
|
||||
static const unsigned int I386();
|
||||
static unsigned int I386();
|
||||
|
||||
// AMD x86_64, AMD64, Intel EM64T, or Intel 64
|
||||
static const unsigned int X86_64();
|
||||
static unsigned int X86_64();
|
||||
|
||||
// ARM.
|
||||
static const unsigned int ARM();
|
||||
static unsigned int ARM();
|
||||
};
|
||||
|
||||
// Create a handler for the dwarf2reader::CallFrameInfo parser that
|
||||
|
|
|
@ -116,7 +116,7 @@ class nsPrintDialogWidgetGTK {
|
|||
nsPrintDialogWidgetGTK(nsIDOMWindow *aParent, nsIPrintSettings *aPrintSettings);
|
||||
~nsPrintDialogWidgetGTK() { gtk_widget_destroy(dialog); }
|
||||
NS_ConvertUTF16toUTF8 GetUTF8FromBundle(const char* aKey);
|
||||
const gint Run();
|
||||
gint Run();
|
||||
|
||||
nsresult ImportSettings(nsIPrintSettings *aNSSettings);
|
||||
nsresult ExportSettings(nsIPrintSettings *aNSSettings);
|
||||
|
@ -343,7 +343,7 @@ nsPrintDialogWidgetGTK::OptionWidgetToString(GtkWidget *dropdown)
|
|||
return header_footer_tags[index];
|
||||
}
|
||||
|
||||
const gint
|
||||
gint
|
||||
nsPrintDialogWidgetGTK::Run()
|
||||
{
|
||||
const gint response = gtk_dialog_run(GTK_DIALOG(dialog));
|
||||
|
|
|
@ -38,8 +38,9 @@ namespace {
|
|||
struct DebugFilesAutoLockTraits
|
||||
{
|
||||
typedef PRLock* type;
|
||||
const static type empty() { return nullptr; }
|
||||
const static void release(type aL) { PR_Unlock(aL); }
|
||||
typedef const PRLock* const_type;
|
||||
static const_type empty() { return nullptr; }
|
||||
static void release(type aL) { PR_Unlock(aL); }
|
||||
};
|
||||
|
||||
class DebugFilesAutoLock : public Scoped<DebugFilesAutoLockTraits>
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* pointer identity.
|
||||
*/
|
||||
|
||||
[scriptable, builtinclass, uuid(1f341018-521a-49de-b806-1bef5c9a00b0)]
|
||||
[scriptable, builtinclass, uuid(8b8c11d4-3ed5-4079-8974-73c7576cdb34)]
|
||||
interface nsIAtom : nsISupports
|
||||
{
|
||||
/**
|
||||
|
@ -48,7 +48,7 @@ interface nsIAtom : nsISupports
|
|||
return mString;
|
||||
}
|
||||
|
||||
inline const uint32_t GetLength() const {
|
||||
inline uint32_t GetLength() const {
|
||||
return mLength;
|
||||
}
|
||||
|
||||
|
|
|
@ -305,7 +305,7 @@ public:
|
|||
~PLDHashTable();
|
||||
|
||||
// This should be used rarely.
|
||||
const PLDHashTableOps* const Ops() { return mOps; }
|
||||
const PLDHashTableOps* Ops() const { return mOps; }
|
||||
|
||||
// Size in entries (gross, not net of free and removed sentinels) for table.
|
||||
// This can be zero if no elements have been added yet, in which case the
|
||||
|
|
|
@ -260,6 +260,7 @@ template<class E, class Derived>
|
|||
struct nsTArray_SafeElementAtHelper<E*, Derived>
|
||||
{
|
||||
typedef E* elem_type;
|
||||
//typedef const E* const_elem_type; XXX: see below
|
||||
typedef size_t index_type;
|
||||
|
||||
elem_type SafeElementAt(index_type aIndex)
|
||||
|
@ -267,7 +268,11 @@ struct nsTArray_SafeElementAtHelper<E*, Derived>
|
|||
return static_cast<Derived*>(this)->SafeElementAt(aIndex, nullptr);
|
||||
}
|
||||
|
||||
const elem_type SafeElementAt(index_type aIndex) const
|
||||
// XXX: Probably should return const_elem_type, but callsites must be fixed.
|
||||
// Also, the use of const_elem_type for nsTArray<xpcGCCallback> in
|
||||
// xpcprivate.h causes build failures on Windows because xpcGCCallback is a
|
||||
// function pointer and MSVC doesn't like qualifying it with |const|.
|
||||
elem_type SafeElementAt(index_type aIndex) const
|
||||
{
|
||||
return static_cast<const Derived*>(this)->SafeElementAt(aIndex, nullptr);
|
||||
}
|
||||
|
@ -279,6 +284,7 @@ template<class E, class Derived>
|
|||
struct nsTArray_SafeElementAtSmartPtrHelper
|
||||
{
|
||||
typedef E* elem_type;
|
||||
typedef const E* const_elem_type;
|
||||
typedef size_t index_type;
|
||||
|
||||
elem_type SafeElementAt(index_type aIndex)
|
||||
|
@ -286,7 +292,8 @@ struct nsTArray_SafeElementAtSmartPtrHelper
|
|||
return static_cast<Derived*>(this)->SafeElementAt(aIndex, nullptr);
|
||||
}
|
||||
|
||||
const elem_type SafeElementAt(index_type aIndex) const
|
||||
// XXX: Probably should return const_elem_type, but callsites must be fixed.
|
||||
elem_type SafeElementAt(index_type aIndex) const
|
||||
{
|
||||
return static_cast<const Derived*>(this)->SafeElementAt(aIndex, nullptr);
|
||||
}
|
||||
|
@ -313,8 +320,9 @@ template<class T> class OwningNonNull;
|
|||
template<class E, class Derived>
|
||||
struct nsTArray_SafeElementAtHelper<mozilla::OwningNonNull<E>, Derived>
|
||||
{
|
||||
typedef E* elem_type;
|
||||
typedef size_t index_type;
|
||||
typedef E* elem_type;
|
||||
typedef const E* const_elem_type;
|
||||
typedef size_t index_type;
|
||||
|
||||
elem_type SafeElementAt(index_type aIndex)
|
||||
{
|
||||
|
@ -324,7 +332,8 @@ struct nsTArray_SafeElementAtHelper<mozilla::OwningNonNull<E>, Derived>
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
const elem_type SafeElementAt(index_type aIndex) const
|
||||
// XXX: Probably should return const_elem_type, but callsites must be fixed.
|
||||
elem_type SafeElementAt(index_type aIndex) const
|
||||
{
|
||||
if (aIndex < static_cast<const Derived*>(this)->Length()) {
|
||||
return static_cast<const Derived*>(this)->ElementAt(aIndex);
|
||||
|
|
Загрузка…
Ссылка в новой задаче