Bug 1170794 followup: Add 'override' annotations to Convert() & Reset() methods in intl/uconv. rs=ehsan
authorDaniel Holbert <dholbert@cs.stanford.edu>
Thu, 18 Jun 2015 12:09:23 -0700
changeset 280398 46adc427071d6d7ba83f0b66f45a09473cb6ad58
parent 280397 32aa45a637cbe703b27a1c989f27d571de8bc165
child 280399 4b0fb77f77a43835b83f07afee72574d06b6998a
push id4932
push userjlund@mozilla.com
push dateMon, 10 Aug 2015 18:23:06 +0000
treeherdermozilla-beta@6dd5a4f5f745 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersehsan
bugs1170794
milestone41.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 1170794 followup: Add 'override' annotations to Convert() & Reset() methods in intl/uconv. rs=ehsan Landing on CLOSED TREE with a=RyanVM The fixed warnings are "-Winconsistent-missing-override", and they started being spammed here because the main patch on this bug added another method to these classes, which was (correctly) labeled as 'override'. This meant these preexisting un-annotated methods "inconsistently missing" the annotation. So, adding the annotation to fix the inconsistency & make clang happy.
intl/uconv/nsReplacementToUnicode.h
intl/uconv/nsUTF8ToUnicode.h
intl/uconv/ucvlatin/nsUTF16ToUnicode.h
--- a/intl/uconv/nsReplacementToUnicode.h
+++ b/intl/uconv/nsReplacementToUnicode.h
@@ -17,21 +17,21 @@
 class nsReplacementToUnicode : public nsBasicDecoderSupport
 {
 public:
   nsReplacementToUnicode();
 
   NS_IMETHOD Convert(const char* aSrc,
                      int32_t* aSrcLength,
                      char16_t* aDest,
-                     int32_t* aDestLength);
+                     int32_t* aDestLength) override;
 
   MOZ_WARN_UNUSED_RESULT NS_IMETHOD GetMaxLength(const char* aSrc,
                                                  int32_t aSrcLength,
                                                  int32_t* aDestLength) override;
 
-  NS_IMETHOD Reset();
+  NS_IMETHOD Reset() override;
 
 private:
   bool mSeenByte;
 };
 
 #endif // nsReplacementToUnicode_h_
--- a/intl/uconv/nsUTF8ToUnicode.h
+++ b/intl/uconv/nsUTF8ToUnicode.h
@@ -52,19 +52,19 @@ protected:
   MOZ_WARN_UNUSED_RESULT NS_IMETHOD GetMaxLength(const char* aSrc,
                                                  int32_t aSrcLength,
                                                  int32_t* aDestLength) override;
 
   //--------------------------------------------------------------------
   // Subclassing of nsBasicDecoderSupport class [declaration]
 
   NS_IMETHOD Convert(const char * aSrc, int32_t * aSrcLength, 
-      char16_t * aDest, int32_t * aDestLength);
+      char16_t * aDest, int32_t * aDestLength) override;
 
   //--------------------------------------------------------------------
   // Subclassing of nsBasicDecoderSupport class [declaration]
 
-  NS_IMETHOD Reset();
+  NS_IMETHOD Reset() override;
 
 };
 
 #endif /* nsUTF8ToUnicode_h___ */
 
--- a/intl/uconv/ucvlatin/nsUTF16ToUnicode.h
+++ b/intl/uconv/ucvlatin/nsUTF16ToUnicode.h
@@ -22,17 +22,17 @@ protected:
 
 public:
   //--------------------------------------------------------------------
   // Subclassing of nsDecoderSupport class [declaration]
 
   MOZ_WARN_UNUSED_RESULT NS_IMETHOD GetMaxLength(const char* aSrc,
                                                  int32_t aSrcLength,
                                                  int32_t* aDestLength) override;
-  NS_IMETHOD Reset();
+  NS_IMETHOD Reset() override;
 
 protected:
   uint8_t mState;
   // to store an odd byte left over between runs
   uint8_t mOddByte;
   // to store an odd high surrogate left over between runs
   char16_t mOddHighSurrogate;
   // to store an odd low surrogate left over between runs