Index: ui/wm/core/shadow_types.cc |
diff --git a/ui/wm/core/shadow_types.cc b/ui/wm/core/shadow_types.cc |
index 3f53d1b40659824c1efee68e2ebbcb59be583a71..fc205e72374b88839da9efcc37f2b84ee6f31e0f 100644 |
--- a/ui/wm/core/shadow_types.cc |
+++ b/ui/wm/core/shadow_types.cc |
@@ -19,11 +19,16 @@ void SetShadowElevation(aura::Window* window, ShadowElevation elevation) { |
} |
bool IsValidShadowElevation(int64_t value) { |
- return value == int64_t(ShadowElevation::DEFAULT) || |
- value == int64_t(ShadowElevation::NONE) || |
- value == int64_t(ShadowElevation::SMALL) || |
- value == int64_t(ShadowElevation::MEDIUM) || |
- value == int64_t(ShadowElevation::LARGE); |
+ switch (static_cast<ShadowElevation>(value)) { |
+ case ShadowElevation::DEFAULT: |
+ case ShadowElevation::NONE: |
+ case ShadowElevation::TINY: |
+ case ShadowElevation::SMALL: |
+ case ShadowElevation::MEDIUM: |
+ case ShadowElevation::LARGE: |
+ return true; |
+ } |
+ return false; |
} |
} // namespace wm |