Bug 1255655 - Const-ify k{Unix,Win}Charsets and kLangGroups. r=smontagu.
authorNicholas Nethercote <nnethercote@mozilla.com>
Fri, 11 Mar 2016 12:58:17 +1100
changeset 328712 87dc4355a517fdd4b4273ed0043195a3c2610efd
parent 328711 d85b18faba720414b82b3c8223386f438c67a81b
child 328713 318273f25e6d460d8e267353efe4f72406587ca1
push id1146
push userCallek@gmail.com
push dateMon, 25 Jul 2016 16:35:44 +0000
treeherdermozilla-release@a55778f9cd5a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmontagu
bugs1255655
milestone48.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1255655 - Const-ify k{Unix,Win}Charsets and kLangGroups. r=smontagu.
intl/locale/nsLanguageAtomService.cpp
intl/locale/nsUConvPropertySearch.cpp
intl/locale/nsUConvPropertySearch.h
intl/locale/unix/nsUNIXCharset.cpp
intl/locale/windows/nsWinCharset.cpp
--- a/intl/locale/nsLanguageAtomService.cpp
+++ b/intl/locale/nsLanguageAtomService.cpp
@@ -10,17 +10,17 @@
 #include "nsIAtom.h"
 #include "mozilla/ArrayUtils.h"
 #include "mozilla/Services.h"
 #include "nsServiceManagerUtils.h"
 #include "mozilla/dom/EncodingUtils.h"
 
 using namespace mozilla;
 
-static const char* kLangGroups[][3] = {
+static const char* const kLangGroups[][3] = {
 #include "langGroups.properties.h"
 };
 
 NS_IMPL_ISUPPORTS(nsLanguageAtomService, nsILanguageAtomService)
 
 nsLanguageAtomService::nsLanguageAtomService()
 {
 }
--- a/intl/locale/nsUConvPropertySearch.cpp
+++ b/intl/locale/nsUConvPropertySearch.cpp
@@ -8,26 +8,26 @@
 #include "mozilla/BinarySearch.h"
 
 namespace {
 
 struct PropertyComparator
 {
   const nsCString& mKey;
   explicit PropertyComparator(const nsCString& aKey) : mKey(aKey) {}
-  int operator()(const char* (&aProperty)[3]) const {
+  int operator()(const char* const (&aProperty)[3]) const {
     return mKey.Compare(aProperty[0]);
   }
 };
 
 } // namespace
 
 // static
 nsresult
-nsUConvPropertySearch::SearchPropertyValue(const char* aProperties[][3],
+nsUConvPropertySearch::SearchPropertyValue(const char* const aProperties[][3],
                                            int32_t aNumberOfProperties,
                                            const nsACString& aKey,
                                            nsACString& aValue)
 {
   using mozilla::BinarySearchIf;
 
   const nsCString& flat = PromiseFlatCString(aKey);
   size_t index;
--- a/intl/locale/nsUConvPropertySearch.h
+++ b/intl/locale/nsUConvPropertySearch.h
@@ -16,15 +16,15 @@ class nsUConvPropertySearch
      * @param aProperties
      *   the static property array
      * @param aKey
      *   the key to look up
      * @param aValue
      *   the return value (empty string if not found)
      * @return NS_OK if found or NS_ERROR_FAILURE if not found
      */
-    static nsresult SearchPropertyValue(const char* aProperties[][3],
+    static nsresult SearchPropertyValue(const char* const aProperties[][3],
                                         int32_t aNumberOfProperties,
                                         const nsACString& aKey,
                                         nsACString& aValue);
 };
 
 #endif /* nsUConvPropertySearch_h_ */
--- a/intl/locale/unix/nsUNIXCharset.cpp
+++ b/intl/locale/unix/nsUNIXCharset.cpp
@@ -24,17 +24,17 @@
 #include "nsPlatformCharset.h"
 #include "prinit.h"
 #include "nsUnicharUtils.h"
 #include "mozilla/dom/EncodingUtils.h"
 
 using mozilla::dom::EncodingUtils;
 using namespace mozilla;
 
-static const char* kUnixCharsets[][3] = {
+static const char* const kUnixCharsets[][3] = {
 #include "unixcharset.properties.h"
 };
 
 NS_IMPL_ISUPPORTS(nsPlatformCharset, nsIPlatformCharset)
 
 nsPlatformCharset::nsPlatformCharset()
 {
 }
--- a/intl/locale/windows/nsWinCharset.cpp
+++ b/intl/locale/windows/nsWinCharset.cpp
@@ -12,17 +12,17 @@
 #include "nsCOMPtr.h"
 #include "nsReadableUtils.h"
 #include "nsServiceManagerUtils.h"
 #include "nsPlatformCharset.h"
 #include "nsEncoderDecoderUtils.h"
 
 using namespace mozilla;
 
-static const char* kWinCharsets[][3] = {
+static const char* const kWinCharsets[][3] = {
 #include "wincharset.properties.h"
 };
 
 NS_IMPL_ISUPPORTS(nsPlatformCharset, nsIPlatformCharset)
 
 nsPlatformCharset::nsPlatformCharset()
 {
   nsAutoString acpKey(NS_LITERAL_STRING("acp."));