diff --git a/src/vkcv/Window.cpp b/src/vkcv/Window.cpp index 521373d1c585e2748ec83020a85767edd050ef4f..da88e8615d7867922511d9ca3009a3adec97d80a 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);