Commit 6b5199f
committed
MB-67564: Fix narrowing conversion in Histogram
When we compile Magma with MSVC with `/we4267 /we4244` enabled, we see
the following error:
```
C:\...\platform\include\platform/histogram.h(157):
error C4244: '=': conversion from 'T' to 'double',
possible loss of data
with
[
T=size_t
]
```
This patch aims to fix this by using a `gsl::narrow_cast`.
Change-Id: Idfcd5d6a7adff6781f4fe48dd9d065ee20f20cfa
Reviewed-on: https://review.couchbase.org/c/platform/+/231522
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Jim Walker <jim@couchbase.com>1 parent 05d0272 commit 6b5199f
1 file changed
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
154 | 155 | | |
155 | 156 | | |
156 | 157 | | |
157 | | - | |
| 158 | + | |
158 | 159 | | |
159 | 160 | | |
160 | 161 | | |
| |||
0 commit comments