Bug 1373525 - intl/unicharutil: Move ScopedUNumberFormatTraits class out of unnamed namespace. r=emk
authorChris Peterson <cpeterson@mozilla.com>
Sun, 11 Jun 2017 14:45:24 -0700
changeset 414170 16402249e8624cf40f71b411764d52c0c157b6e4
parent 414169 cda636d722f2e20556b92ae27831fc5123ca9e31
child 414171 9c9ef268fd3a0240a53a9c4768142adeb5f51f19
push id7566
push usermtabara@mozilla.com
push dateWed, 02 Aug 2017 08:25:16 +0000
treeherdermozilla-beta@86913f512c3c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersemk
bugs1373525
milestone56.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 1373525 - intl/unicharutil: Move ScopedUNumberFormatTraits class out of unnamed namespace. r=emk Move the class definition out of an unnamed namespace because it is in a header files included in multiple source files. clang treats the header file's class declaration in an unnamed namespace as distinct in each compilation unit and emits -Wunused-member-function warnings because the member function release() is used in some compilation units but not others. intl/unicharutil/util/ICUUtils.h:25:17 [-Wunused-member-function] unused member function 'empty' intl/unicharutil/util/ICUUtils.h:26:17 [-Wunused-member-function] unused member function 'release' MozReview-Commit-ID: 7AgzzzRgni4
intl/unicharutil/util/ICUUtils.h
--- a/intl/unicharutil/util/ICUUtils.h
+++ b/intl/unicharutil/util/ICUUtils.h
@@ -14,22 +14,20 @@
 #ifdef MOZILLA_INTERNAL_API
 
 #include "mozilla/Scoped.h"
 #include "nsStringGlue.h"
 #include "unicode/unum.h" // for UNumberFormat
 
 class nsIContent;
 
-namespace {
-  struct ScopedUNumberFormatTraits {
-    typedef UNumberFormat* type;
-    static type empty() { return nullptr; }
-    static void release(type handle) { if (handle) unum_close(handle); }
-  };
+struct ScopedUNumberFormatTraits {
+  typedef UNumberFormat* type;
+  static type empty() { return nullptr; }
+  static void release(type handle) { if (handle) unum_close(handle); }
 };
 typedef mozilla::Scoped<ScopedUNumberFormatTraits> AutoCloseUNumberFormat;
 
 class ICUUtils
 {
 public:
 
   /**
@@ -106,9 +104,8 @@ public:
   static void ToICUString(nsAString& aMozString, UnicodeString& aICUString);
 #endif
 };
 
 #endif /* ENABLE_INTL_API */
 #endif /* MOZILLA_INTERNAL_API */
 
 #endif /* mozilla_ICUUtils_h__ */
-