Index: base/metrics/histogram_macros.h |
diff --git a/base/metrics/histogram_macros.h b/base/metrics/histogram_macros.h |
index dcde7255c8dafee8e28c09e21baf492408ea8682..b60c3abdbb03cd0687d6bf6deb3dcebb002cbcd1 100644 |
--- a/base/metrics/histogram_macros.h |
+++ b/base/metrics/histogram_macros.h |
@@ -148,10 +148,12 @@ |
// One additional bucket is created in the LinearHistogram for the illegal |
// values >= boundary_value so that mistakes in calling the UMA enumeration |
// macros can be detected. |
-#define HISTOGRAM_ENUMERATION_WITH_FLAG(name, sample, boundary, flag) \ |
- STATIC_HISTOGRAM_POINTER_BLOCK(name, Add(sample), \ |
- base::LinearHistogram::FactoryGet(name, 1, boundary, boundary + 1, \ |
- flag)) |
+#define HISTOGRAM_ENUMERATION_WITH_FLAG(name, sample, boundary, flag) \ |
+ STATIC_HISTOGRAM_POINTER_BLOCK( \ |
+ name, Add(static_cast<base::HistogramBase::Sample>(sample)), \ |
+ base::LinearHistogram::FactoryGet( \ |
+ name, 1, static_cast<base::HistogramBase::Sample>(boundary), \ |
+ static_cast<uint32_t>(boundary) + 1, flag)) |
Ilya Sherman
2016/08/22 20:52:12
I'm not comfortable with adding a blanket static_c
Sidney San Martín
2016/08/25 00:55:11
Thanks, in retrospect that was careless. I created
Ilya Sherman
2016/08/25 01:12:56
Very cool! What does a compile error look like if
Sidney San Martín
2016/08/30 18:46:37
It passed doubles through, since existing code alr
|
#define LOCAL_HISTOGRAM_PERCENTAGE(name, under_one_hundred) \ |
LOCAL_HISTOGRAM_ENUMERATION(name, under_one_hundred, 101) |