Fixed some VS warnings

Thanks to Fraggy again !


Former-commit-id: bd0eea66714701b065892d8b69d576e7b3615dd2
This commit is contained in:
Lynix
2013-09-21 00:10:10 +02:00
parent 6440d38c5c
commit 3167531b39
19 changed files with 95 additions and 73 deletions

View File

@@ -1279,9 +1279,9 @@ nzUInt8 NzImage::GetMaxLevel(unsigned int width, unsigned int height, unsigned i
{
static const float invLog2 = 1.f/std::log(2.f);
unsigned int widthLevel = invLog2 * std::log(static_cast<float>(width));
unsigned int heightLevel = invLog2 * std::log(static_cast<float>(height));
unsigned int depthLevel = invLog2 * std::log(static_cast<float>(depth));
unsigned int widthLevel = static_cast<unsigned int>(invLog2 * std::log(static_cast<float>(width)));
unsigned int heightLevel = static_cast<unsigned int>(invLog2 * std::log(static_cast<float>(height)));
unsigned int depthLevel = static_cast<unsigned int>(invLog2 * std::log(static_cast<float>(depth)));
return std::max(std::max(std::max(widthLevel, heightLevel), depthLevel), 1U);
}