Explicit conversions to inhibit MSVC2015 warnings.

This commit is contained in:
Mathew Sutcliffe
2015-11-03 23:57:00 +00:00
parent f1162813e9
commit fa6338bafa
2 changed files with 4 additions and 4 deletions

View File

@@ -285,12 +285,12 @@ void XPMPLoadPlanesIfNecessary(void)
int XPMPGetNumberOfInstalledModels(void)
{
int number = 0;
size_t number = 0;
for (const auto& package : gPackages)
{
number += package.planes.size();
}
return number;
return static_cast<int>(number);
}
void XPMPGetModelInfo(int inIndex, const char** outModelName, const char** outIcao, const char** outAirline, const char** outLivery)
@@ -301,7 +301,7 @@ void XPMPGetModelInfo(int inIndex, const char** outModelName, const char** outIc
if (counter + static_cast<int>(package.planes.size()) < inIndex + 1)
{
counter += package.planes.size();
counter += static_cast<int>(package.planes.size());
continue;
}

View File

@@ -171,7 +171,7 @@ void obj_init()
NULL, NULL,
NULL, NULL,
obj_get_float_array, NULL,
NULL, NULL, reinterpret_cast<void *>(i), NULL);
NULL, NULL, reinterpret_cast<void *>(static_cast<intptr_t>(i)), NULL);
}
}