explicit conversion

This commit is contained in:
qPCR4vir 2019-07-31 16:56:23 +02:00
parent 0562136c19
commit 7a1c299ff7

View File

@ -96,11 +96,11 @@ namespace nana
{ {
if (widget_) if (widget_)
{ {
auto value_px = (widget_->size().width - border_px * 2); unsigned value_px = (widget_->size().width - border_px * 2);
//avoid overflow //avoid overflow
if (unknown_ || (value_ < max_)) if (unknown_ || (value_ < max_))
value_px = static_cast<unsigned>(value_px * (double(value_) / double(max_))); value_px = unsigned(double(value_px) * (double(value_) / double(max_)));
if (value_px != value_px_) if (value_px != value_px_)
{ {