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:
Jonathan DeCarlo 2017-11-20 22:39:57 -05:00
parent 8893afe13c
commit 399929d381

View File

@ -566,7 +566,7 @@ namespace cxxopts
throw argument_incorrect_type(text);
}
result = result * base + digit;
result = static_cast<US>(result * base + digit);
}
detail::check_signed_range<T>(negative, result, text);
@ -1091,7 +1091,7 @@ namespace cxxopts
auto riter = m_results.find(iter->second);
return riter->second.count();
return static_cast<int>(riter->second.count());
}
const OptionValue&