Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(452)

Unified Diff: ui/latency/mojo/latency_info_struct_traits.h

Issue 2856623002: Adding static asserts to LatencyInfo struct traits. (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/latency/mojo/latency_info_struct_traits.h
diff --git a/ui/latency/mojo/latency_info_struct_traits.h b/ui/latency/mojo/latency_info_struct_traits.h
index 473de788c5ce0b05c15da9f007c47b5c1d4e7453..f560fb242c3a41c38dc12455200aecaa99bdd8aa 100644
--- a/ui/latency/mojo/latency_info_struct_traits.h
+++ b/ui/latency/mojo/latency_info_struct_traits.h
@@ -11,6 +11,17 @@
namespace mojo {
+static_assert(
+ static_cast<int>(
+ ui::mojom::LatencyComponentType::LATENCY_COMPONENT_TYPE_LAST) ==
+ static_cast<int>(ui::LATENCY_COMPONENT_TYPE_LAST),
+ "Enum size mismatch");
+
+static_assert(
+ static_cast<int>(ui::mojom::SourceEventType::SOURCE_EVENT_TYPE_LAST) ==
+ static_cast<int>(ui::SOURCE_EVENT_TYPE_LAST),
+ "Enum size mismatch");
+
template <>
struct ArrayTraits<ui::LatencyInfo::LatencyMap> {
using Element = ui::LatencyInfo::LatencyMap::value_type;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698