Bug 1118418 - Mark virtual overridden functions as MOZ_OVERRIDE in intl; r=smontagu
authorEhsan Akhgari <ehsan@mozilla.com>
Tue, 06 Jan 2015 15:12:14 -0500
changeset 248167 cdbe4d2202d7b7451398a92a2e73b9b341d89d27
parent 248166 8c274aebb986b90687f7d6dab7944b38c6f1f171
child 248168 efb6031640b7bb3734bb94d704795bf29ecfdfa2
push id4489
push userraliiev@mozilla.com
push dateMon, 23 Feb 2015 15:17:55 +0000
treeherdermozilla-beta@fd7c3dc24146 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmontagu
bugs1118418
milestone37.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 1118418 - Mark virtual overridden functions as MOZ_OVERRIDE in intl; r=smontagu
intl/chardet/nsCyrillicDetector.h
intl/locale/mac/nsDateTimeFormatMac.h
intl/locale/nsCollation.h
intl/locale/nsLanguageAtomService.h
intl/locale/nsPlatformCharset.h
intl/locale/nsScriptableDateFormat.cpp
intl/lwbrk/nsJISx4051LineBreaker.h
intl/lwbrk/nsSampleWordBreaker.h
intl/uconv/nsUCSupport.h
intl/uconv/nsUnicodeToUTF8.h
intl/unicharutil/nsCaseConversionImp2.h
intl/unicharutil/nsCategoryImp.h
intl/unicharutil/nsEntityConverter.h
intl/unicharutil/nsSaveAsCharset.h
intl/unicharutil/nsUnicodeNormalizer.h
--- a/intl/chardet/nsCyrillicDetector.h
+++ b/intl/chardet/nsCyrillicDetector.h
@@ -87,41 +87,41 @@ class nsCyrXPCOMDetector :
       public nsICharsetDetector
 {
   public:
     // nsISupports interface
     NS_DECL_ISUPPORTS
     nsCyrXPCOMDetector(uint8_t aItems, 
                       const uint8_t ** aCyrillicClass, 
                       const char **aCharsets);
-    NS_IMETHOD Init(nsICharsetDetectionObserver* aObserver);
-    NS_IMETHOD DoIt(const char* aBuf, uint32_t aLen, bool *oDontFeedMe);
-    NS_IMETHOD Done();
+    NS_IMETHOD Init(nsICharsetDetectionObserver* aObserver) MOZ_OVERRIDE;
+    NS_IMETHOD DoIt(const char* aBuf, uint32_t aLen, bool *oDontFeedMe) MOZ_OVERRIDE;
+    NS_IMETHOD Done() MOZ_OVERRIDE;
   protected:
     virtual ~nsCyrXPCOMDetector();
-    virtual void Report(const char* aCharset);
+    virtual void Report(const char* aCharset) MOZ_OVERRIDE;
   private:
     nsCOMPtr<nsICharsetDetectionObserver> mObserver;
 };
 
 class nsCyrXPCOMStringDetector :  
       public nsCyrillicDetector,
       public nsIStringCharsetDetector
 {
   public:
     // nsISupports interface
     NS_DECL_ISUPPORTS
     nsCyrXPCOMStringDetector(uint8_t aItems, 
                       const uint8_t ** aCyrillicClass, 
                       const char **aCharsets);
     NS_IMETHOD DoIt(const char* aBuf, uint32_t aLen, 
-                     const char** oCharset, nsDetectionConfident &oConf);
+                     const char** oCharset, nsDetectionConfident &oConf) MOZ_OVERRIDE;
   protected:
     virtual ~nsCyrXPCOMStringDetector();
-    virtual void Report(const char* aCharset);
+    virtual void Report(const char* aCharset) MOZ_OVERRIDE;
   private:
     nsCOMPtr<nsICharsetDetectionObserver> mObserver;
     const char* mResult;
 };
 
 class nsRUProbDetector : public nsCyrXPCOMDetector
 {
   public:
--- a/intl/locale/mac/nsDateTimeFormatMac.h
+++ b/intl/locale/mac/nsDateTimeFormatMac.h
@@ -17,37 +17,37 @@ class nsDateTimeFormatMac : public nsIDa
 public: 
   NS_DECL_THREADSAFE_ISUPPORTS 
 
   // performs a locale sensitive date formatting operation on the time_t parameter
   NS_IMETHOD FormatTime(nsILocale* locale, 
                         const nsDateFormatSelector  dateFormatSelector, 
                         const nsTimeFormatSelector timeFormatSelector, 
                         const time_t  timetTime, 
-                        nsAString& stringOut); 
+                        nsAString& stringOut) MOZ_OVERRIDE; 
 
   // performs a locale sensitive date formatting operation on the struct tm parameter
   NS_IMETHOD FormatTMTime(nsILocale* locale, 
                           const nsDateFormatSelector  dateFormatSelector, 
                           const nsTimeFormatSelector timeFormatSelector, 
                           const struct tm*  tmTime, 
-                          nsAString& stringOut); 
+                          nsAString& stringOut) MOZ_OVERRIDE; 
   // performs a locale sensitive date formatting operation on the PRTime parameter
   NS_IMETHOD FormatPRTime(nsILocale* locale, 
                           const nsDateFormatSelector  dateFormatSelector, 
                           const nsTimeFormatSelector timeFormatSelector, 
                           const PRTime  prTime, 
-                          nsAString& stringOut);
+                          nsAString& stringOut) MOZ_OVERRIDE;
 
   // performs a locale sensitive date formatting operation on the PRExplodedTime parameter
   NS_IMETHOD FormatPRExplodedTime(nsILocale* locale, 
                                   const nsDateFormatSelector  dateFormatSelector, 
                                   const nsTimeFormatSelector timeFormatSelector, 
                                   const PRExplodedTime*  explodedTime, 
-                                  nsAString& stringOut); 
+                                  nsAString& stringOut) MOZ_OVERRIDE; 
 
   nsDateTimeFormatMac() {}
 
 protected:
   virtual ~nsDateTimeFormatMac() {}
 
 private:
   // init this interface to a specified locale
--- a/intl/locale/nsCollation.h
+++ b/intl/locale/nsCollation.h
@@ -18,17 +18,17 @@ class nsIUnicodeEncoder;
 // 
 class nsCollationFactory MOZ_FINAL : public nsICollationFactory {
 
   ~nsCollationFactory() {}
 
 public: 
   NS_DECL_ISUPPORTS 
 
-  NS_IMETHOD CreateCollation(nsILocale* locale, nsICollation** instancePtr);
+  NS_IMETHOD CreateCollation(nsILocale* locale, nsICollation** instancePtr) MOZ_OVERRIDE;
 
   nsCollationFactory() {}
 };
 
 
 struct nsCollation {
 
 public: 
--- a/intl/locale/nsLanguageAtomService.h
+++ b/intl/locale/nsLanguageAtomService.h
@@ -15,25 +15,25 @@
 
 class nsLanguageAtomService MOZ_FINAL : public nsILanguageAtomService
 {
 public:
   NS_DECL_ISUPPORTS
 
   // nsILanguageAtomService
   virtual nsIAtom*
-    LookupLanguage(const nsACString &aLanguage, nsresult *aError);
+    LookupLanguage(const nsACString &aLanguage, nsresult *aError) MOZ_OVERRIDE;
 
   virtual already_AddRefed<nsIAtom>
-    LookupCharSet(const nsACString& aCharSet);
+    LookupCharSet(const nsACString& aCharSet) MOZ_OVERRIDE;
 
-  virtual nsIAtom* GetLocaleLanguage(nsresult *aError);
+  virtual nsIAtom* GetLocaleLanguage(nsresult *aError) MOZ_OVERRIDE;
 
   virtual nsIAtom* GetLanguageGroup(nsIAtom *aLanguage,
-                                                nsresult *aError);
+                                                nsresult *aError) MOZ_OVERRIDE;
 
   nsLanguageAtomService();
 
 private:
   ~nsLanguageAtomService() { }
 
 protected:
   nsresult InitLangGroupTable();
--- a/intl/locale/nsPlatformCharset.h
+++ b/intl/locale/nsPlatformCharset.h
@@ -11,18 +11,18 @@ class nsPlatformCharset : public nsIPlat
 {
   NS_DECL_ISUPPORTS
 
 public:
 
   nsPlatformCharset();
 
   NS_IMETHOD Init();
-  NS_IMETHOD GetCharset(nsPlatformCharsetSel selector, nsACString& oResult);
-  NS_IMETHOD GetDefaultCharsetForLocale(const nsAString& localeName, nsACString& oResult);
+  NS_IMETHOD GetCharset(nsPlatformCharsetSel selector, nsACString& oResult) MOZ_OVERRIDE;
+  NS_IMETHOD GetDefaultCharsetForLocale(const nsAString& localeName, nsACString& oResult) MOZ_OVERRIDE;
 
 private:
   nsCString mCharset;
   nsString mLocale; // remember the locale & charset
 
   nsresult MapToCharset(nsAString& inANSICodePage, nsACString& outCharset);
   nsresult InitGetCharset(nsACString& oString);
   nsresult VerifyCharset(nsCString &aCharset);
--- a/intl/locale/nsScriptableDateFormat.cpp
+++ b/intl/locale/nsScriptableDateFormat.cpp
@@ -21,33 +21,33 @@ class nsScriptableDateFormat : public ns
                             nsDateFormatSelector dateFormatSelector, 
                             nsTimeFormatSelector timeFormatSelector, 
                             int32_t year, 
                             int32_t month, 
                             int32_t day, 
                             int32_t hour, 
                             int32_t minute, 
                             int32_t second, 
-                            char16_t **dateTimeString);
+                            char16_t **dateTimeString) MOZ_OVERRIDE;
 
   NS_IMETHOD FormatDate(const char16_t *locale, 
                         nsDateFormatSelector dateFormatSelector, 
                         int32_t year, 
                         int32_t month, 
                         int32_t day, 
-                        char16_t **dateString)
+                        char16_t **dateString) MOZ_OVERRIDE
                         {return FormatDateTime(locale, dateFormatSelector, kTimeFormatNone, 
                                                year, month, day, 0, 0, 0, dateString);}
 
   NS_IMETHOD FormatTime(const char16_t *locale, 
                         nsTimeFormatSelector timeFormatSelector, 
                         int32_t hour, 
                         int32_t minute, 
                         int32_t second, 
-                        char16_t **timeString)
+                        char16_t **timeString) MOZ_OVERRIDE
                         {return FormatDateTime(locale, kDateFormatNone, timeFormatSelector, 
                                                1999, 1, 1, hour, minute, second, timeString);}
 
   nsScriptableDateFormat() {}
 
 private:
   nsString mStringOut;   
 
--- a/intl/lwbrk/nsJISx4051LineBreaker.h
+++ b/intl/lwbrk/nsJISx4051LineBreaker.h
@@ -13,25 +13,25 @@ class nsJISx4051LineBreaker : public nsI
   NS_DECL_ISUPPORTS
 
 private:
   virtual ~nsJISx4051LineBreaker();
 
 public:
   nsJISx4051LineBreaker();
 
-  int32_t Next( const char16_t* aText, uint32_t aLen, uint32_t aPos);
+  int32_t Next( const char16_t* aText, uint32_t aLen, uint32_t aPos) MOZ_OVERRIDE;
 
-  int32_t Prev( const char16_t* aText, uint32_t aLen, uint32_t aPos);
+  int32_t Prev( const char16_t* aText, uint32_t aLen, uint32_t aPos) MOZ_OVERRIDE;
 
   virtual void GetJISx4051Breaks(const char16_t* aText, uint32_t aLength,
                                  uint8_t aBreakMode,
-                                 uint8_t* aBreakBefore);
+                                 uint8_t* aBreakBefore) MOZ_OVERRIDE;
   virtual void GetJISx4051Breaks(const uint8_t* aText, uint32_t aLength,
                                  uint8_t aBreakMode,
-                                 uint8_t* aBreakBefore);
+                                 uint8_t* aBreakBefore) MOZ_OVERRIDE;
 
 private:
   int32_t WordMove(const char16_t* aText, uint32_t aLen, uint32_t aPos,
                    int8_t aDirection);
 };
 
 #endif  /* nsJISx4051LineBreaker_h__ */
--- a/intl/lwbrk/nsSampleWordBreaker.h
+++ b/intl/lwbrk/nsSampleWordBreaker.h
@@ -22,21 +22,21 @@ typedef enum {
 class nsSampleWordBreaker : public nsIWordBreaker
 {
   NS_DECL_ISUPPORTS
 public:
 
   nsSampleWordBreaker() ;
 
   bool BreakInBetween(const char16_t* aText1 , uint32_t aTextLen1,
-                        const char16_t* aText2 , uint32_t aTextLen2);
+                        const char16_t* aText2 , uint32_t aTextLen2) MOZ_OVERRIDE;
   nsWordRange FindWord(const char16_t* aText1 , uint32_t aTextLen1,
-                       uint32_t aOffset);
+                       uint32_t aOffset) MOZ_OVERRIDE;
 
-  int32_t NextWord(const char16_t* aText, uint32_t aLen, uint32_t aPos);
+  int32_t NextWord(const char16_t* aText, uint32_t aLen, uint32_t aPos) MOZ_OVERRIDE;
 
 protected:
   uint8_t  GetClass(char16_t aChar);
 
   virtual ~nsSampleWordBreaker();
 };
 
 #endif  /* nsSampleWordBreaker_h__ */
--- a/intl/uconv/nsUCSupport.h
+++ b/intl/uconv/nsUCSupport.h
@@ -76,18 +76,18 @@ public:
   /**
    * Class constructor.
    */
   nsBasicDecoderSupport();
 
   //--------------------------------------------------------------------
   // Interface nsIUnicodeDecoder [declaration]
 
-  virtual void SetInputErrorBehavior(int32_t aBehavior);
-  virtual char16_t GetCharacterForUnMapped();
+  virtual void SetInputErrorBehavior(int32_t aBehavior) MOZ_OVERRIDE;
+  virtual char16_t GetCharacterForUnMapped() MOZ_OVERRIDE;
 
 protected:
   int32_t   mErrBehavior;
 
   /**
    * Class destructor.
    */
   virtual ~nsBasicDecoderSupport();
--- a/intl/uconv/nsUnicodeToUTF8.h
+++ b/intl/uconv/nsUnicodeToUTF8.h
@@ -39,26 +39,26 @@ public:
   /**
    * Class constructor.
    */
   nsUnicodeToUTF8() {mHighSurrogate = 0;}
 
   NS_IMETHOD Convert(const char16_t * aSrc, 
                      int32_t * aSrcLength, 
                      char * aDest, 
-                     int32_t * aDestLength);
+                     int32_t * aDestLength) MOZ_OVERRIDE;
 
-  NS_IMETHOD Finish(char * aDest, int32_t * aDestLength);
+  NS_IMETHOD Finish(char * aDest, int32_t * aDestLength) MOZ_OVERRIDE;
 
   NS_IMETHOD GetMaxLength(const char16_t * aSrc, int32_t aSrcLength, 
-      int32_t * aDestLength);
+      int32_t * aDestLength) MOZ_OVERRIDE;
 
-  NS_IMETHOD Reset() {mHighSurrogate = 0; return NS_OK;}
+  NS_IMETHOD Reset() MOZ_OVERRIDE {mHighSurrogate = 0; return NS_OK;}
 
   NS_IMETHOD SetOutputErrorBehavior(int32_t aBehavior, 
-    nsIUnicharEncoder * aEncoder, char16_t aChar) {return NS_OK;}
+    nsIUnicharEncoder * aEncoder, char16_t aChar) MOZ_OVERRIDE {return NS_OK;}
 
 protected:
   char16_t mHighSurrogate;
 
 };
 
 #endif /* nsUnicodeToUTF8_h___ */
--- a/intl/unicharutil/nsCaseConversionImp2.h
+++ b/intl/unicharutil/nsCaseConversionImp2.h
@@ -14,22 +14,22 @@
 class nsCaseConversionImp2 : public nsICaseConversion { 
   NS_DECL_THREADSAFE_ISUPPORTS 
 
 public:
   virtual ~nsCaseConversionImp2() { }
 
   static nsCaseConversionImp2* GetInstance();
 
-  NS_IMETHOD ToUpper(char16_t aChar, char16_t* aReturn);
+  NS_IMETHOD ToUpper(char16_t aChar, char16_t* aReturn) MOZ_OVERRIDE;
 
-  NS_IMETHOD ToLower(char16_t aChar, char16_t* aReturn);
+  NS_IMETHOD ToLower(char16_t aChar, char16_t* aReturn) MOZ_OVERRIDE;
 
-  NS_IMETHOD ToTitle(char16_t aChar, char16_t* aReturn);
+  NS_IMETHOD ToTitle(char16_t aChar, char16_t* aReturn) MOZ_OVERRIDE;
 
-  NS_IMETHOD ToUpper(const char16_t* anArray, char16_t* aReturn, uint32_t aLen);
+  NS_IMETHOD ToUpper(const char16_t* anArray, char16_t* aReturn, uint32_t aLen) MOZ_OVERRIDE;
 
-  NS_IMETHOD ToLower(const char16_t* anArray, char16_t* aReturn, uint32_t aLen);
+  NS_IMETHOD ToLower(const char16_t* anArray, char16_t* aReturn, uint32_t aLen) MOZ_OVERRIDE;
 
-  NS_IMETHOD CaseInsensitiveCompare(const char16_t* aLeft, const char16_t* aRight, uint32_t aLength, int32_t *aResult);
+  NS_IMETHOD CaseInsensitiveCompare(const char16_t* aLeft, const char16_t* aRight, uint32_t aLength, int32_t *aResult) MOZ_OVERRIDE;
 };
 
 #endif
--- a/intl/unicharutil/nsCategoryImp.h
+++ b/intl/unicharutil/nsCategoryImp.h
@@ -11,12 +11,12 @@ class nsCategoryImp : public nsIUGenCate
    NS_DECL_THREADSAFE_ISUPPORTS
    
 public:
    static nsCategoryImp* GetInstance();
     
    /**
     * Give a Unichar, return a nsUGenCategory
     */
-   virtual nsUGenCategory Get(uint32_t aChar);
+   virtual nsUGenCategory Get(uint32_t aChar) MOZ_OVERRIDE;
 };
 
 #endif  /* nsCategoryImp_h__ */
--- a/intl/unicharutil/nsEntityConverter.h
+++ b/intl/unicharutil/nsEntityConverter.h
@@ -34,20 +34,20 @@ public:
 	//
 	// nsISupports
 	//
 	NS_DECL_ISUPPORTS
 
 	//
 	// nsIEntityConverter
 	//
-	NS_IMETHOD ConvertUTF32ToEntity(uint32_t character, uint32_t entityVersion, char **_retval);
-	NS_IMETHOD ConvertToEntity(char16_t character, uint32_t entityVersion, char **_retval);
+	NS_IMETHOD ConvertUTF32ToEntity(uint32_t character, uint32_t entityVersion, char **_retval) MOZ_OVERRIDE;
+	NS_IMETHOD ConvertToEntity(char16_t character, uint32_t entityVersion, char **_retval) MOZ_OVERRIDE;
 
-	NS_IMETHOD ConvertToEntities(const char16_t *inString, uint32_t entityVersion, char16_t **_retval);
+	NS_IMETHOD ConvertToEntities(const char16_t *inString, uint32_t entityVersion, char16_t **_retval) MOZ_OVERRIDE;
 
 protected:
 
   // load a version property file and generate a version list (number/name pair)
   NS_IMETHOD LoadVersionPropertyFile();
 
   // map version number to version string
   const char16_t* GetVersionName(uint32_t versionNumber);
--- a/intl/unicharutil/nsSaveAsCharset.h
+++ b/intl/unicharutil/nsSaveAsCharset.h
@@ -32,21 +32,21 @@ public:
 	//
 	// nsISupports
 	//
 	NS_DECL_ISUPPORTS
 
 	//
 	// nsIEntityConverter
 	//
-  NS_IMETHOD Init(const char *charset, uint32_t attr, uint32_t entityVersion);
+  NS_IMETHOD Init(const char *charset, uint32_t attr, uint32_t entityVersion) MOZ_OVERRIDE;
 
-  NS_IMETHOD Convert(const char16_t *inString, char **_retval);
+  NS_IMETHOD Convert(const char16_t *inString, char **_retval) MOZ_OVERRIDE;
 
-  NS_IMETHODIMP GetCharset(char * *aCharset);
+  NS_IMETHODIMP GetCharset(char * *aCharset) MOZ_OVERRIDE;
 
 protected:
 
   virtual ~nsSaveAsCharset();
 
   NS_IMETHOD DoCharsetConversion(const char16_t *inString, char **outString);
 
   NS_IMETHOD DoConversionFallBack(uint32_t inUCS4, char *outString, int32_t bufferLength);
--- a/intl/unicharutil/nsUnicodeNormalizer.h
+++ b/intl/unicharutil/nsUnicodeNormalizer.h
@@ -15,20 +15,20 @@ nsresult NS_NewUnicodeNormalizer(nsISupp
 
 
 class nsUnicodeNormalizer : public nsIUnicodeNormalizer {
 public:
    nsUnicodeNormalizer();
 
    NS_DECL_ISUPPORTS 
 
-   NS_IMETHOD NormalizeUnicodeNFD( const nsAString& aSrc, nsAString& aDest);
-   NS_IMETHOD NormalizeUnicodeNFC( const nsAString& aSrc, nsAString& aDest);
-   NS_IMETHOD NormalizeUnicodeNFKD( const nsAString& aSrc, nsAString& aDest);
-   NS_IMETHOD NormalizeUnicodeNFKC( const nsAString& aSrc, nsAString& aDest);
+   NS_IMETHOD NormalizeUnicodeNFD( const nsAString& aSrc, nsAString& aDest) MOZ_OVERRIDE;
+   NS_IMETHOD NormalizeUnicodeNFC( const nsAString& aSrc, nsAString& aDest) MOZ_OVERRIDE;
+   NS_IMETHOD NormalizeUnicodeNFKD( const nsAString& aSrc, nsAString& aDest) MOZ_OVERRIDE;
+   NS_IMETHOD NormalizeUnicodeNFKC( const nsAString& aSrc, nsAString& aDest) MOZ_OVERRIDE;
 
    // low-level access to the composition data needed for HarfBuzz callbacks
    static bool Compose(uint32_t a, uint32_t b, uint32_t *ab);
    static bool DecomposeNonRecursively(uint32_t comp, uint32_t *c1, uint32_t *c2);
 
 private:
    virtual ~nsUnicodeNormalizer();
 };