Bug 711799 - Add MOZ_FINAL a bunch of places to silence Clang warnings. r=dbaron

--HG--
extra : rebase_source : e87978380d0821746e7df78dfacc7e381aefccb3
This commit is contained in:
Jeff Walden 2011-12-17 22:47:45 -05:00
parent 0f769da574
commit d58b48ade0
11 changed files with 56 additions and 34 deletions

View File

@ -38,6 +38,8 @@
#ifndef nsDirectoryIndexStream_h__
#define nsDirectoryIndexStream_h__
#include "mozilla/Attributes.h"
#include "nsIFile.h"
#include "nsString.h"
#include "nsIInputStream.h"
@ -45,7 +47,7 @@
#include "nsCOMArray.h"
#include "nsITextToSubURI.h"
class nsDirectoryIndexStream : public nsIInputStream
class nsDirectoryIndexStream MOZ_FINAL : public nsIInputStream
{
private:
nsCString mBuf;

View File

@ -36,6 +36,8 @@
*
* ***** END LICENSE BLOCK ***** */
#include "mozilla/Attributes.h"
#include "nsIIncrementalDownload.h"
#include "nsIRequestObserver.h"
#include "nsIProgressEventSink.h"
@ -120,13 +122,14 @@ MakeRangeSpec(const PRInt64 &size, const PRInt64 &maxSize, PRInt32 chunkSize,
//-----------------------------------------------------------------------------
class nsIncrementalDownload : public nsIIncrementalDownload
, public nsIStreamListener
, public nsIObserver
, public nsIInterfaceRequestor
, public nsIChannelEventSink
, public nsSupportsWeakReference
, public nsIAsyncVerifyRedirectCallback
class nsIncrementalDownload MOZ_FINAL
: public nsIIncrementalDownload
, public nsIStreamListener
, public nsIObserver
, public nsIInterfaceRequestor
, public nsIChannelEventSink
, public nsSupportsWeakReference
, public nsIAsyncVerifyRedirectCallback
{
public:
NS_DECL_ISUPPORTS

View File

@ -42,13 +42,15 @@
#ifndef __nsconsoleservice_h__
#define __nsconsoleservice_h__
#include "mozilla/Attributes.h"
#include "mozilla/Mutex.h"
#include "nsCOMPtr.h"
#include "nsHashtable.h"
#include "nsIConsoleService.h"
class nsConsoleService : public nsIConsoleService
class nsConsoleService MOZ_FINAL : public nsIConsoleService
{
public:
nsConsoleService();

View File

@ -36,6 +36,8 @@
*
* ***** END LICENSE BLOCK ***** */
#include "mozilla/Attributes.h"
#include "nsISupports.h"
#include "nsExceptionService.h"
#include "nsIServiceManager.h"
@ -69,7 +71,7 @@ public:
};
/** Exception Manager definition **/
class nsExceptionManager : public nsIExceptionManager
class nsExceptionManager MOZ_FINAL : public nsIExceptionManager
{
public:
NS_DECL_ISUPPORTS

View File

@ -39,7 +39,9 @@
#ifndef nsExceptionService_h__
#define nsExceptionService_h__
#include "mozilla/Attributes.h"
#include "mozilla/Mutex.h"
#include "nsIException.h"
#include "nsIExceptionService.h"
#include "nsIObserverService.h"
@ -49,7 +51,7 @@
class nsExceptionManager;
/** Exception Service definition **/
class nsExceptionService : public nsIExceptionService, public nsIObserver
class nsExceptionService MOZ_FINAL : public nsIExceptionService, public nsIObserver
{
public:
NS_DECL_ISUPPORTS

View File

@ -39,10 +39,12 @@
#ifndef _NSUUIDGENERATOR_H_
#define _NSUUIDGENERATOR_H_
#include "mozilla/Attributes.h"
#include "mozilla/Mutex.h"
#include "nsIUUIDGenerator.h"
class nsUUIDGenerator : public nsIUUIDGenerator {
class nsUUIDGenerator MOZ_FINAL : public nsIUUIDGenerator {
public:
nsUUIDGenerator();

View File

@ -35,9 +35,11 @@
*
* ***** END LICENSE BLOCK ***** */
#include "mozilla/Attributes.h"
#include "nsIVersionComparator.h"
class nsVersionComparatorImpl : public nsIVersionComparator
class nsVersionComparatorImpl MOZ_FINAL : public nsIVersionComparator
{
public:
NS_DECL_ISUPPORTS

View File

@ -39,6 +39,7 @@
#ifndef mozilla_GenericModule_h
#define mozilla_GenericModule_h
#include "mozilla/Attributes.h"
#include "mozilla/Module.h"
#define NS_GENERIC_FACTORY_CONSTRUCTOR(_InstanceClass) \
@ -134,7 +135,7 @@ _InstanceClass##Constructor(nsISupports *aOuter, REFNSIID aIID, \
namespace mozilla {
class GenericModule : public nsIModule
class GenericModule MOZ_FINAL : public nsIModule
{
public:
GenericModule(const mozilla::Module* aData)

View File

@ -38,9 +38,11 @@
#ifndef nsByteBuffer_h__
#define nsByteBuffer_h__
#include "mozilla/Attributes.h"
#include "nsIByteBuffer.h"
class ByteBufferImpl : public nsIByteBuffer {
class ByteBufferImpl MOZ_FINAL : public nsIByteBuffer {
public:
ByteBufferImpl(void);

View File

@ -39,12 +39,14 @@
#ifndef nsSupportsPrimitives_h__
#define nsSupportsPrimitives_h__
#include "mozilla/Attributes.h"
#include "nsISupportsPrimitives.h"
#include "nsCOMPtr.h"
#include "nsString.h"
#include "nsDependentString.h"
class nsSupportsIDImpl : public nsISupportsID
class nsSupportsIDImpl MOZ_FINAL : public nsISupportsID
{
public:
NS_DECL_ISUPPORTS
@ -61,7 +63,7 @@ private:
/***************************************************************************/
class nsSupportsCStringImpl : public nsISupportsCString
class nsSupportsCStringImpl MOZ_FINAL : public nsISupportsCString
{
public:
NS_DECL_ISUPPORTS
@ -78,7 +80,7 @@ private:
/***************************************************************************/
class nsSupportsStringImpl : public nsISupportsString
class nsSupportsStringImpl MOZ_FINAL : public nsISupportsString
{
public:
NS_DECL_ISUPPORTS
@ -95,7 +97,7 @@ private:
/***************************************************************************/
class nsSupportsPRBoolImpl : public nsISupportsPRBool
class nsSupportsPRBoolImpl MOZ_FINAL : public nsISupportsPRBool
{
public:
NS_DECL_ISUPPORTS
@ -112,7 +114,7 @@ private:
/***************************************************************************/
class nsSupportsPRUint8Impl : public nsISupportsPRUint8
class nsSupportsPRUint8Impl MOZ_FINAL : public nsISupportsPRUint8
{
public:
NS_DECL_ISUPPORTS
@ -129,7 +131,7 @@ private:
/***************************************************************************/
class nsSupportsPRUint16Impl : public nsISupportsPRUint16
class nsSupportsPRUint16Impl MOZ_FINAL : public nsISupportsPRUint16
{
public:
NS_DECL_ISUPPORTS
@ -146,7 +148,7 @@ private:
/***************************************************************************/
class nsSupportsPRUint32Impl : public nsISupportsPRUint32
class nsSupportsPRUint32Impl MOZ_FINAL : public nsISupportsPRUint32
{
public:
NS_DECL_ISUPPORTS
@ -163,7 +165,7 @@ private:
/***************************************************************************/
class nsSupportsPRUint64Impl : public nsISupportsPRUint64
class nsSupportsPRUint64Impl MOZ_FINAL : public nsISupportsPRUint64
{
public:
NS_DECL_ISUPPORTS
@ -180,7 +182,7 @@ private:
/***************************************************************************/
class nsSupportsPRTimeImpl : public nsISupportsPRTime
class nsSupportsPRTimeImpl MOZ_FINAL : public nsISupportsPRTime
{
public:
NS_DECL_ISUPPORTS
@ -197,7 +199,7 @@ private:
/***************************************************************************/
class nsSupportsCharImpl : public nsISupportsChar
class nsSupportsCharImpl MOZ_FINAL : public nsISupportsChar
{
public:
NS_DECL_ISUPPORTS
@ -214,7 +216,7 @@ private:
/***************************************************************************/
class nsSupportsPRInt16Impl : public nsISupportsPRInt16
class nsSupportsPRInt16Impl MOZ_FINAL : public nsISupportsPRInt16
{
public:
NS_DECL_ISUPPORTS
@ -231,7 +233,7 @@ private:
/***************************************************************************/
class nsSupportsPRInt32Impl : public nsISupportsPRInt32
class nsSupportsPRInt32Impl MOZ_FINAL : public nsISupportsPRInt32
{
public:
NS_DECL_ISUPPORTS
@ -248,7 +250,7 @@ private:
/***************************************************************************/
class nsSupportsPRInt64Impl : public nsISupportsPRInt64
class nsSupportsPRInt64Impl MOZ_FINAL : public nsISupportsPRInt64
{
public:
NS_DECL_ISUPPORTS
@ -265,7 +267,7 @@ private:
/***************************************************************************/
class nsSupportsFloatImpl : public nsISupportsFloat
class nsSupportsFloatImpl MOZ_FINAL : public nsISupportsFloat
{
public:
NS_DECL_ISUPPORTS
@ -282,7 +284,7 @@ private:
/***************************************************************************/
class nsSupportsDoubleImpl : public nsISupportsDouble
class nsSupportsDoubleImpl MOZ_FINAL : public nsISupportsDouble
{
public:
NS_DECL_ISUPPORTS
@ -299,7 +301,7 @@ private:
/***************************************************************************/
class nsSupportsVoidImpl : public nsISupportsVoid
class nsSupportsVoidImpl MOZ_FINAL : public nsISupportsVoid
{
public:
NS_DECL_ISUPPORTS
@ -316,7 +318,7 @@ private:
/***************************************************************************/
class nsSupportsInterfacePointerImpl : public nsISupportsInterfacePointer
class nsSupportsInterfacePointerImpl MOZ_FINAL : public nsISupportsInterfacePointer
{
public:
NS_DECL_ISUPPORTS
@ -340,7 +342,7 @@ private:
* Only use this class with static buffers, or arena-allocated buffers of
* permanent lifetime!
*/
class nsSupportsDependentCString : public nsISupportsCString
class nsSupportsDependentCString MOZ_FINAL : public nsISupportsCString
{
public:
NS_DECL_ISUPPORTS

View File

@ -37,6 +37,8 @@
#ifndef nsCategoryCache_h_
#define nsCategoryCache_h_
#include "mozilla/Attributes.h"
#include "nsICategoryManager.h"
#include "nsIObserver.h"
#include "nsISimpleEnumerator.h"
@ -62,7 +64,7 @@ class NS_NO_VTABLE nsCategoryListener {
virtual void CategoryCleared() = 0;
};
class NS_COM_GLUE nsCategoryObserver : public nsIObserver {
class NS_COM_GLUE nsCategoryObserver MOZ_FINAL : public nsIObserver {
public:
nsCategoryObserver(const char* aCategory,
nsCategoryListener* aCategoryListener);