Build fixes for clang
This commit is contained in:
parent
a68f0f26a8
commit
074eb8e41c
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user