Fix for two compiler warnings: (1) implicit assignment of signed to unsigned with possible loss of data (explicit cast to 'US' type fixes that warning by showing intent), and (2) implicit conversion from 'size_t' to 'int' with possible loss of data (again, explicit cast to 'int' fixes that warning by showing intent).
This commit is contained in:
parent
8893afe13c
commit
399929d381
@ -566,7 +566,7 @@ namespace cxxopts
|
|||||||
throw argument_incorrect_type(text);
|
throw argument_incorrect_type(text);
|
||||||
}
|
}
|
||||||
|
|
||||||
result = result * base + digit;
|
result = static_cast<US>(result * base + digit);
|
||||||
}
|
}
|
||||||
|
|
||||||
detail::check_signed_range<T>(negative, result, text);
|
detail::check_signed_range<T>(negative, result, text);
|
||||||
@ -1091,7 +1091,7 @@ namespace cxxopts
|
|||||||
|
|
||||||
auto riter = m_results.find(iter->second);
|
auto riter = m_results.find(iter->second);
|
||||||
|
|
||||||
return riter->second.count();
|
return static_cast<int>(riter->second.count());
|
||||||
}
|
}
|
||||||
|
|
||||||
const OptionValue&
|
const OptionValue&
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user