From 6be15b96ae4a9f0a73aaea794602201ddf0c4242 Mon Sep 17 00:00:00 2001 From: Moonchild Date: Thu, 17 Sep 2020 23:48:58 +0000 Subject: Issue #1224 - Remove constant expressions from /dom This excludes DOMProxy handlers in dom bindings because that's intertwined with codegen and js that needs to be handled together. --- dom/animation/AnimationPerformanceWarning.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'dom/animation') diff --git a/dom/animation/AnimationPerformanceWarning.h b/dom/animation/AnimationPerformanceWarning.h index a1ac35cba0..582c48cc3f 100644 --- a/dom/animation/AnimationPerformanceWarning.h +++ b/dom/animation/AnimationPerformanceWarning.h @@ -38,8 +38,6 @@ struct AnimationPerformanceWarning std::initializer_list aParams) : mType(aType) { - // FIXME: Once std::initializer_list::size() become a constexpr function, - // we should use static_assert here. MOZ_ASSERT(aParams.size() <= kMaxParamsForLocalization, "The length of parameters should be less than " "kMaxParamsForLocalization"); @@ -49,11 +47,11 @@ struct AnimationPerformanceWarning // Maximum number of parameters passed to // nsContentUtils::FormatLocalizedString to localize warning messages. // - // NOTE: This constexpr can't be forward declared, so if you want to use + // NOTE: This can't be forward declared, so if you want to use // this variable, please include this header file directly. // This value is the same as the limit of nsStringBundle::FormatString. // See the implementation of nsStringBundle::FormatString. - static constexpr uint8_t kMaxParamsForLocalization = 10; + static const uint8_t kMaxParamsForLocalization = 10; // Indicates why this property could not be animated on the compositor. Type mType; -- cgit v1.2.3