From 6017ecdaccda6bc9ebda1470714e17f8255ea858 Mon Sep 17 00:00:00 2001 From: nabijaczleweli Date: Sun, 8 Mar 2020 16:39:19 +0100 Subject: [PATCH] Fix two trivial implicit double to int conversion warnings. NFC --- src/render/rendergl3.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/render/rendergl3.cpp b/src/render/rendergl3.cpp index b620aee..4816496 100644 --- a/src/render/rendergl3.cpp +++ b/src/render/rendergl3.cpp @@ -693,8 +693,8 @@ void OpenGl3Renderer::Clear() { } std::shared_ptr OpenGl3Renderer::ReadFrame() { - int width = camera.width * camera.pixelRatio; - int height = camera.height * camera.pixelRatio; + int width = (int)(camera.width * camera.pixelRatio); + int height = (int)(camera.height * camera.pixelRatio); std::shared_ptr pixmap = Pixmap::Create(Pixmap::Format::RGBA, (size_t)width, (size_t)height); glReadPixels(0, 0, width, height, GL_RGBA, GL_UNSIGNED_BYTE, &pixmap->data[0]);