Fix compile errors due to size_t -> int/double conversion warnings on 64bit Linux

This commit is contained in:
Robert Knight 2011-08-31 12:55:22 +01:00
parent cc387031d7
commit f16b6e9933
2 changed files with 3 additions and 2 deletions

View file

@ -11,7 +11,7 @@
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;
}

View file

@ -254,7 +254,8 @@ void UpdateInstaller::installFiles()
++filesInstalled;
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));
}
}