Use unsigned type for integer digit
Fixes #109. Although we always used numbers in the ASCII range, it was in a `size_t`, leading to a warning about possible loss of data on some compilers.
This commit is contained in:
parent
d47101a101
commit
e725ea3084
@ -9,6 +9,10 @@ options. The project adheres to semantic versioning.
|
||||
|
||||
* Allow integers to have leading zeroes.
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* Fix a warning about possible loss of data.
|
||||
|
||||
## 2.1.1
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
@ -547,7 +547,7 @@ namespace cxxopts
|
||||
|
||||
for (auto iter = value_match.first; iter != value_match.second; ++iter)
|
||||
{
|
||||
size_t digit = 0;
|
||||
US digit = 0;
|
||||
|
||||
if (*iter >= '0' && *iter <= '9')
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user