From f9dd16846506e99813f530de9d5c457b9e70bb66 Mon Sep 17 00:00:00 2001 From: Sebastian Gaida <gaida@ca-digit.com> Date: Mon, 3 May 2021 13:42:31 +0200 Subject: [PATCH] [#8][Form] changed ternary operator to max --- src/vkcv/Window.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vkcv/Window.cpp b/src/vkcv/Window.cpp index 521373d1..da88e861 100644 --- a/src/vkcv/Window.cpp +++ b/src/vkcv/Window.cpp @@ -14,8 +14,8 @@ namespace vkcv { Window Window::create(const char *windowTitle, int width, int height, bool resizable) { vkcv::initGLFW(); - width = width <= 0 ? 1 : width; - height = height <= 0 ? 1 : height; + width = std::max(width, 1); + height = std::max(height, 1); glfwWindowHint(GLFW_CLIENT_API, GLFW_NO_API); glfwWindowHint(GLFW_RESIZABLE, resizable ? GLFW_TRUE : GLFW_FALSE); -- GitLab