From 9313832a8a7d66bd837f155181805b46bd80388c Mon Sep 17 00:00:00 2001 From: Navin Lal Date: Sat, 25 Jul 2009 03:27:08 +0200 Subject: [PATCH] Bug 74803 - Should make global data const where possible; const changes for nsmodulecomponentinfo; r=dbaron --- embedding/browser/photon/src/nsUnknownContentTypeHandler.cpp | 2 +- extensions/auth/nsAuthFactory.cpp | 2 +- extensions/spellcheck/src/mozSpellCheckerFactory.cpp | 2 +- intl/build/nsI18nModule.cpp | 2 +- intl/chardet/src/nsChardetModule.cpp | 2 +- modules/libjar/zipwriter/src/ZipWriterModule.cpp | 2 +- toolkit/xre/nsAppRunner.cpp | 2 +- widget/src/photon/nsWidgetFactory.cpp | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/embedding/browser/photon/src/nsUnknownContentTypeHandler.cpp b/embedding/browser/photon/src/nsUnknownContentTypeHandler.cpp index 151ed9bd9d6..5947a250f0b 100644 --- a/embedding/browser/photon/src/nsUnknownContentTypeHandler.cpp +++ b/embedding/browser/photon/src/nsUnknownContentTypeHandler.cpp @@ -204,7 +204,7 @@ NS_IMETHODIMP className::QueryInterface( REFNSIID anIID, void **anInstancePtr ) NS_GENERIC_FACTORY_CONSTRUCTOR( nsUnknownContentTypeHandler ) // The list of components we register -static nsModuleComponentInfo info[] = { +static const nsModuleComponentInfo info[] = { { "nsUnknownContentTypeHandler", NS_IHELPERAPPLAUNCHERDIALOG_IID, diff --git a/extensions/auth/nsAuthFactory.cpp b/extensions/auth/nsAuthFactory.cpp index 0ffaf396659..96e8b33edcb 100644 --- a/extensions/auth/nsAuthFactory.cpp +++ b/extensions/auth/nsAuthFactory.cpp @@ -209,7 +209,7 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsAuthSASL) //----------------------------------------------------------------------------- -static nsModuleComponentInfo components[] = { +static const nsModuleComponentInfo components[] = { { "nsAuthKerbGSS", NS_GSSAUTH_CID, NS_AUTH_MODULE_CONTRACTID_PREFIX "kerb-gss", diff --git a/extensions/spellcheck/src/mozSpellCheckerFactory.cpp b/extensions/spellcheck/src/mozSpellCheckerFactory.cpp index f261253e81f..abe6b92738b 100644 --- a/extensions/spellcheck/src/mozSpellCheckerFactory.cpp +++ b/extensions/spellcheck/src/mozSpellCheckerFactory.cpp @@ -117,7 +117,7 @@ mozInlineSpellCheckerConstructor(nsISupports *aOuter, REFNSIID aIID, // information like the function to create an instance, contractid, and // class name. // -static nsModuleComponentInfo components[] = { +static const nsModuleComponentInfo components[] = { #ifdef MOZ_MACBROWSER { "OSX Spell check service", diff --git a/intl/build/nsI18nModule.cpp b/intl/build/nsI18nModule.cpp index b61303d1b36..ca93b0c8f55 100644 --- a/intl/build/nsI18nModule.cpp +++ b/intl/build/nsI18nModule.cpp @@ -56,7 +56,7 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsSemanticUnitScanner) -static nsModuleComponentInfo components[] = +static const nsModuleComponentInfo components[] = { // lwbrk { "Line Breaker", NS_LBRK_CID, diff --git a/intl/chardet/src/nsChardetModule.cpp b/intl/chardet/src/nsChardetModule.cpp index a91d5248ec9..fcdf788d397 100644 --- a/intl/chardet/src/nsChardetModule.cpp +++ b/intl/chardet/src/nsChardetModule.cpp @@ -127,7 +127,7 @@ nsUKProbDetectorRegistrationProc(nsIComponentManager *aCompMgr, } -static nsModuleComponentInfo components[] = +static const nsModuleComponentInfo components[] = { { "Meta Charset", NS_META_CHARSET_CID, NS_META_CHARSET_CONTRACTID, nsMetaCharsetObserverConstructor, diff --git a/modules/libjar/zipwriter/src/ZipWriterModule.cpp b/modules/libjar/zipwriter/src/ZipWriterModule.cpp index 2bbd9305cd3..73a4a1e3e58 100644 --- a/modules/libjar/zipwriter/src/ZipWriterModule.cpp +++ b/modules/libjar/zipwriter/src/ZipWriterModule.cpp @@ -43,7 +43,7 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsDeflateConverter) NS_GENERIC_FACTORY_CONSTRUCTOR(nsZipWriter) -static nsModuleComponentInfo components[] = +static const nsModuleComponentInfo components[] = { { DEFLATECONVERTER_CLASSNAME, diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp index 1adb569f948..06a0c46c295 100644 --- a/toolkit/xre/nsAppRunner.cpp +++ b/toolkit/xre/nsAppRunner.cpp @@ -1010,7 +1010,7 @@ ScopedXPCOMStartup::~ScopedXPCOMStartup() #define APPINFO_CID \ { 0x95d89e3e, 0xa169, 0x41a3, { 0x8e, 0x56, 0x71, 0x99, 0x78, 0xe1, 0x5b, 0x12 } } -static nsModuleComponentInfo kComponents[] = +static const nsModuleComponentInfo kComponents[] = { { "nsXULAppInfo", diff --git a/widget/src/photon/nsWidgetFactory.cpp b/widget/src/photon/nsWidgetFactory.cpp index e3cd700dfe4..b40f996d4da 100644 --- a/widget/src/photon/nsWidgetFactory.cpp +++ b/widget/src/photon/nsWidgetFactory.cpp @@ -79,7 +79,7 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsFilePicker) NS_GENERIC_FACTORY_CONSTRUCTOR(nsBidiKeyboard) #endif -static nsModuleComponentInfo components[] = +static const nsModuleComponentInfo components[] = { { "Ph nsWindow", NS_WINDOW_CID,