Commit a3b60ed
committed
SIL: avoid truncation warnings on Windows (NFCI)
`enum` is a signed integer type on some platforms. The return value of
`std::numeric_limits<T>::max()` is a `size_t` which is unsigned. Further
manipulation retains the unsigned-ness until the assignment which
results in truncation. Change the type to a `constexpr` constant
definition and remove the `enum` type along with a type conversion to an
explicitly unsigned integral type.1 parent 159259a commit a3b60ed
3 files changed
+9
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
156 | | - | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
157 | 159 | | |
158 | 160 | | |
159 | 161 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
130 | | - | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
131 | 133 | | |
132 | 134 | | |
133 | 135 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1021 | 1021 | | |
1022 | 1022 | | |
1023 | 1023 | | |
1024 | | - | |
| 1024 | + | |
| 1025 | + | |
| 1026 | + | |
1025 | 1027 | | |
1026 | 1028 | | |
1027 | 1029 | | |
| |||
0 commit comments