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