Added static cast to float to avoid compile error under MSV

This commit is contained in:
Robert Osfield
2012-11-05 09:36:00 +00:00
parent e45bdb60d7
commit 18d66619b0

View File

@@ -651,7 +651,7 @@ int main(int argc, char** argv)
{
movie_event_handler = new MovieEventHandler();
unsigned int num_files_per_row = std::max(osg::round(sqrt(std::min(max_videos, static_cast<unsigned int>(files.size())))), 1.0);
unsigned int num_files_per_row = std::max(osg::round(sqrt(static_cast<float>(std::min(max_videos, static_cast<unsigned int>(files.size()))))), 1.0);
static const float new_row_at = num_files_per_row * desired_height * 16 / 9.0;
unsigned int num_videos = 0;