Build fixes for clang

This commit is contained in:
Robert Osfield
2013-10-21 09:56:57 +00:00
parent ca8f3d5f8a
commit be2d80abca
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_width = CGImageGetWidth(image_ref);
size_t the_height = CGImageGetHeight(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 bits_per_pixel = CGImageGetBitsPerPixel(image_ref);
size_t bytes_per_row = CGImageGetBytesPerRow(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; supported = true;
// Decode the format // Decode the format
switch (vtfFormat) switch (static_cast<int>(vtfFormat))
{ {
case VTF_FORMAT_DEFAULT: case VTF_FORMAT_DEFAULT:
supported = false; supported = false;

View File

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