Fix a potentially uninitialized value in love.graphics code. Minor cleanup.

This commit is contained in:
Alex Szpakowski
2019-04-02 20:20:18 -03:00
parent b439ff07ce
commit 0c2153e0ca
3 changed files with 2 additions and 3 deletions
-2
View File
@@ -45,8 +45,6 @@ Canvas::Canvas(const Settings &settings)
depth = settings.layers;
else if (texType == TEXTURE_2D_ARRAY)
layers = settings.layers;
else
layers = 1;
if (width <= 0 || height <= 0 || layers <= 0)
throw love::Exception("Canvas dimensions must be greater than 0.");
+1
View File
@@ -371,6 +371,7 @@ public:
RenderTarget()
: canvas(nullptr)
, slice(0)
, mipmap(0)
{}
bool operator != (const RenderTarget &other) const
+1 -1
View File
@@ -1654,7 +1654,7 @@ OpenGL::TextureFormat OpenGL::convertPixelFormat(PixelFormat pixelformat, bool r
break;
default:
printf("Unhandled pixel format when converting to OpenGL enums!");
printf("Unhandled pixel format %d when converting to OpenGL enums!", pixelformat);
break;
}