From 3b6a59e7f163b2d2f8a07ae187b392f71b074cc4 Mon Sep 17 00:00:00 2001 From: Yuqian Yang Date: Sun, 14 Dec 2025 20:46:18 +0800 Subject: Use infinite size for 0 size window. --- include/cru/platform/GraphicsBase.h | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'include/cru/platform/GraphicsBase.h') diff --git a/include/cru/platform/GraphicsBase.h b/include/cru/platform/GraphicsBase.h index 78a1c1a6..0c391b11 100644 --- a/include/cru/platform/GraphicsBase.h +++ b/include/cru/platform/GraphicsBase.h @@ -1,6 +1,4 @@ #pragma once -#include "Base.h" - #include #include @@ -42,9 +40,6 @@ constexpr Point operator-(const Point& left, const Point& right) { } struct Size final { - static CRU_PLATFORM_API const Size kMax; - static CRU_PLATFORM_API const Size kZero; - constexpr Size() = default; constexpr Size(const float width, const float height) : width(width), height(height) {} @@ -64,7 +59,7 @@ struct Size final { return {std::max(width, other.width), std::max(height, other.height)}; } - constexpr Size AtLeast0() const { return Max(kZero); } + constexpr Size AtLeast0() const { return this->Max({}); } std::string ToString() const { return std::format("Size(width: {}, height: {})", width, height); -- cgit v1.2.3