Commit 4b3e7310 authored by Marius Pa's avatar Marius Pa
Browse files

transfer explicit cast to double

Fix PVS-Studio issue "core/transfer.cpp:179: warning: V636
The 'm_uploadedSize / m_downloadedSize' expression was implicitly cast
from 'unsigned long long' type to 'double' type. Consider utilizing an
explicit type cast to avoid the loss of a fractional part. An example:
double A = (double)(X) / Y;.".
parent e0e262f4
Pipeline #235070 passed with stage
in 5 minutes and 2 seconds
......@@ -176,7 +176,7 @@ void Transfer::checkShareRatio()
if (m_downloadedSize == 0 || m_ratio == 0)
return;
if (m_uploadedSize / m_downloadedSize >= m_ratio)
if ((double)m_uploadedSize / m_downloadedSize >= m_ratio)
setDownloadLimit(1, Transfer::InvisibleSpeedLimit);//If we set it to 0 we would have no limit xD
else
setDownloadLimit(0, Transfer::InvisibleSpeedLimit);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment