mirror of
https://github.com/etlegacy/Update-Installer.git
synced 2024-11-10 14:41:50 +00:00
Fix compile errors due to size_t -> int/double conversion warnings on 64bit Linux
This commit is contained in:
parent
cc387031d7
commit
f16b6e9933
2 changed files with 3 additions and 2 deletions
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
bool endsWith(const std::string& str, const char* text)
|
bool endsWith(const std::string& str, const char* text)
|
||||||
{
|
{
|
||||||
int length = strlen(text);
|
size_t length = strlen(text);
|
||||||
return str.find(text,str.size() - length) != 0;
|
return str.find(text,str.size() - length) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -254,7 +254,8 @@ void UpdateInstaller::installFiles()
|
||||||
++filesInstalled;
|
++filesInstalled;
|
||||||
if (m_observer)
|
if (m_observer)
|
||||||
{
|
{
|
||||||
double percentage = (1.0 * filesInstalled / m_script->filesToInstall().size()) * 100.0;
|
int toInstallCount = static_cast<int>(m_script->filesToInstall().size());
|
||||||
|
double percentage = ((1.0 * filesInstalled) / toInstallCount) * 100.0;
|
||||||
m_observer->updateProgress(static_cast<int>(percentage));
|
m_observer->updateProgress(static_cast<int>(percentage));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue