Bug 1549694 - Don't use check as an identifier in IntegerRange.h, since it conflicts with system headers in Mac and Windows. r=froydnj
authorEmilio Cobos Álvarez <emilio@crisal.io>
Tue, 07 May 2019 13:29:17 +0000
changeset 531710 d3125bd46f54e6127e168dd2ccdada6046e847b4
parent 531709 0f42a24f44036244c0b5afc442529d88f5125c16
child 531711 26561f2b9384185befb5ed88fd947032a1a35960
push id11265
push userffxbld-merge
push dateMon, 13 May 2019 10:53:39 +0000
treeherdermozilla-beta@77e0fe8dbdd3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1549694
milestone68.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 1549694 - Don't use check as an identifier in IntegerRange.h, since it conflicts with system headers in Mac and Windows. r=froydnj Differential Revision: https://phabricator.services.mozilla.com/D30183
mfbt/IntegerRange.h
--- a/mfbt/IntegerRange.h
+++ b/mfbt/IntegerRange.h
@@ -136,30 +136,30 @@ class IntegerRange {
 
  private:
   IntTypeT mBegin;
   IntTypeT mEnd;
 };
 
 template <typename T, bool = IsUnsigned<T>::value>
 struct GeqZero {
-  static bool check(T t) { return t >= 0; }
+  static bool isNonNegative(T t) { return t >= 0; }
 };
 
 template <typename T>
 struct GeqZero<T, true> {
-  static bool check(T t) { return true; }
+  static bool isNonNegative(T t) { return true; }
 };
 
 }  // namespace detail
 
 template <typename IntType>
 detail::IntegerRange<IntType> IntegerRange(IntType aEnd) {
   static_assert(IsIntegral<IntType>::value, "value must be integral");
-  MOZ_ASSERT(detail::GeqZero<IntType>::check(aEnd),
+  MOZ_ASSERT(detail::GeqZero<IntType>::isNonNegative(aEnd),
              "Should never have negative value here");
   return detail::IntegerRange<IntType>(aEnd);
 }
 
 template <typename IntType1, typename IntType2>
 detail::IntegerRange<IntType2> IntegerRange(IntType1 aBegin, IntType2 aEnd) {
   static_assert(IsIntegral<IntType1>::value && IsIntegral<IntType2>::value,
                 "values must both be integral");