Skip to content

Commit

Permalink
Bug 1237151 (part 3) - Remove ignored qualifiers in all remaining cod…
Browse files Browse the repository at this point in the history
…e. r=froydnj.
  • Loading branch information
nnethercote committed Jan 6, 2016
1 parent 21a4e84 commit 44ff4e3
Show file tree
Hide file tree
Showing 39 changed files with 98 additions and 88 deletions.
4 changes: 2 additions & 2 deletions docshell/base/timeline/AbstractTimelineMarker.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ class AbstractTimelineMarker
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;
Expand Down
2 changes: 1 addition & 1 deletion dom/gamepad/cocoa/CocoaGamepad.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion dom/inputport/InputPortData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ InputPortData::GetId() const
return mId;
}

const InputPortType
InputPortType
InputPortData::GetType() const
{
return ToInputPortType(mType);
Expand Down
2 changes: 1 addition & 1 deletion dom/inputport/InputPortData.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class InputPortData final : public nsIInputPortData

const nsString& GetId() const;

const InputPortType GetType() const;
InputPortType GetType() const;

private:
~InputPortData();
Expand Down
2 changes: 1 addition & 1 deletion dom/media/android/AndroidMediaDecoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
6 changes: 3 additions & 3 deletions dom/media/omx/OMXCodecWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -805,7 +805,7 @@ class InputBufferHelper final {
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)
{
Expand All @@ -814,12 +814,12 @@ class InputBufferHelper final {
mOffset += aValue;
}

bool IsEmpty()
bool IsEmpty() const
{
return (mOffset == 0);
}

const size_t GetCapacity()
size_t GetCapacity() const
{
return mCapicity;
}
Expand Down
2 changes: 1 addition & 1 deletion dom/notification/Notification.h
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ class Notification : public DOMEventTargetHelper
}
}

static const NotificationDirection StringToDirection(const nsAString& aDirection)
static NotificationDirection StringToDirection(const nsAString& aDirection)
{
if (aDirection.EqualsLiteral("ltr")) {
return NotificationDirection::Ltr;
Expand Down
2 changes: 1 addition & 1 deletion dom/plugins/ipc/PluginMessageUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions dom/presentation/provider/MulticastDNSDeviceProvider.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,12 @@ class MulticastDNSDeviceProvider final
return mAddress;
}

const uint16_t Port() const
uint16_t Port() const
{
return mPort;
}

const DeviceState State() const
DeviceState State() const
{
return mState;
}
Expand Down
2 changes: 1 addition & 1 deletion dom/smil/nsSMILCSSValueType.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
2 changes: 1 addition & 1 deletion dom/svg/SVGTransform.h
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ class SVGTransform final : public nsWrapperCache

// Interface for SVGMatrix's use
friend class dom::SVGMatrix;
const bool IsAnimVal() const {
bool IsAnimVal() const {
return mIsAnimValItem;
}
const gfxMatrix& Matrixgfx() const {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class ParamBlock {
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;
Expand Down
2 changes: 1 addition & 1 deletion gfx/layers/Layers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -941,7 +941,7 @@ Layer::ApplyPendingUpdatesForThisTransaction()
}
}

const float
float
Layer::GetLocalOpacity()
{
float opacity = mOpacity;
Expand Down
4 changes: 2 additions & 2 deletions gfx/layers/Layers.h
Original file line number Diff line number Diff line change
Expand Up @@ -1354,7 +1354,7 @@ class Layer {
* Returns the local opacity for this layer: either mOpacity or,
* for shadow layers, GetShadowOpacity()
*/
const float GetLocalOpacity();
float GetLocalOpacity();

/**
* DRAWING PHASE ONLY
Expand Down Expand Up @@ -1637,7 +1637,7 @@ class Layer {
* 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);
}

Expand Down
4 changes: 2 additions & 2 deletions gfx/thebes/gfxUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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];
}

Expand Down
2 changes: 1 addition & 1 deletion ipc/chromium/src/chrome/common/ipc_message.h
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ class Message : public Pickle {
header()->seqno = aSeqno;
}

const char* const name() const {
const char* name() const {
return name_;
}

Expand Down
2 changes: 1 addition & 1 deletion ipc/chromium/src/chrome/common/ipc_message_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down
2 changes: 1 addition & 1 deletion ipc/ipdl/ipdl/lower.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
16 changes: 8 additions & 8 deletions layout/base/nsPresContext.h
Original file line number Diff line number Diff line change
Expand Up @@ -403,18 +403,18 @@ class nsPresContext : public nsIObserver {
/**
* 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; }
Expand Down
2 changes: 1 addition & 1 deletion layout/generic/nsGridContainerFrame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ class MOZ_STACK_CLASS nsGridContainerFrame::LineNameMap
}

// 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);
Expand Down
6 changes: 3 additions & 3 deletions mozglue/linker/Mappable.h
Original file line number Diff line number Diff line change
Expand Up @@ -239,18 +239,18 @@ class MappableSeekableZStream: public Mappable
}

/* 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());
}
};
Expand Down
6 changes: 3 additions & 3 deletions mozglue/linker/SeekableZStream.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,18 +77,18 @@ class SeekableZStream {
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();
}

Expand Down
6 changes: 3 additions & 3 deletions netwerk/cache2/CacheObserver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ CacheObserver::AttachToPreferences()
}

// static
uint32_t const CacheObserver::MemoryCacheCapacity()
uint32_t CacheObserver::MemoryCacheCapacity()
{
if (sMemoryCacheCapacity >= 0)
return sMemoryCacheCapacity << 10;
Expand Down Expand Up @@ -278,7 +278,7 @@ uint32_t const CacheObserver::MemoryCacheCapacity()
}

// static
bool const CacheObserver::UseNewCache()
bool CacheObserver::UseNewCache()
{
uint32_t useNewCache = sUseNewCache;

Expand Down Expand Up @@ -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;
Expand Down
40 changes: 20 additions & 20 deletions netwerk/cache2/CacheObserver.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion netwerk/cache2/CacheStorageService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ CacheStorageService::MemoryPool::~MemoryPool()
}
}

uint32_t const
uint32_t
CacheStorageService::MemoryPool::Limit() const
{
switch (mType) {
Expand Down
2 changes: 1 addition & 1 deletion netwerk/cache2/CacheStorageService.h
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ class CacheStorageService final : public nsICacheStorageService
void PurgeAll(uint32_t aWhat);

private:
uint32_t const Limit() const;
uint32_t Limit() const;
MemoryPool() = delete;
};

Expand Down
Loading

0 comments on commit 44ff4e3

Please sign in to comment.