Build fixes for clang

This commit is contained in:
Robert Osfield 2013-10-21 09:54:41 +00:00
parent a68f0f26a8
commit 074eb8e41c
3 changed files with 9 additions and 9 deletions

View File

@ -262,7 +262,7 @@ osg::Image* CreateOSGImageFromCGImage(CGImageRef image_ref)
size_t the_width = CGImageGetWidth(image_ref);
size_t the_height = CGImageGetHeight(image_ref);
CGRect the_rect = {{0, 0}, {the_width, the_height}};
CGRect the_rect = {{0.0f, 0.0f}, {static_cast<CGFloat>(the_width), static_cast<CGFloat>(the_height)}};
size_t bits_per_pixel = CGImageGetBitsPerPixel(image_ref);
size_t bytes_per_row = CGImageGetBytesPerRow(image_ref);

View File

@ -171,7 +171,7 @@ bool ConvertImageFormat(unsigned int vtfFormat, int& internalFormat,
supported = true;
// Decode the format
switch (vtfFormat)
switch (static_cast<int>(vtfFormat))
{
case VTF_FORMAT_DEFAULT:
supported = false;

View File

@ -63,7 +63,7 @@ bool Object::load(std::istream& fin)
{
// read header
char buf[256];
if (fin.getline(buf, sizeof(buf)) == 0) {
if (!fin.getline(buf, sizeof(buf))) {
OSG_WARN << "Failed to read DirectX header\n";
return false;
}