From e5a25171fefd917c08e4160435319dd80999999f Mon Sep 17 00:00:00 2001 From: Sam Atkins Date: Wed, 19 Oct 2022 17:09:12 +0100 Subject: [PATCH] LibGfx: Mark `AffineTransform::map()` as only working for numeric `T` The implementations for these methods is manually defined in the .cpp file for `int` and `float`, meaning that other `T` values would fail - but only once we got to the linking stage. This patch makes the error happen much earlier, so it's more obvious. --- Userland/Libraries/LibGfx/AffineTransform.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Userland/Libraries/LibGfx/AffineTransform.h b/Userland/Libraries/LibGfx/AffineTransform.h index f6abcec665..9cdb931219 100644 --- a/Userland/Libraries/LibGfx/AffineTransform.h +++ b/Userland/Libraries/LibGfx/AffineTransform.h @@ -6,6 +6,7 @@ #pragma once +#include #include #include #include @@ -29,13 +30,13 @@ public: void map(float unmapped_x, float unmapped_y, float& mapped_x, float& mapped_y) const; - template + template Point map(Point const&) const; - template + template Size map(Size const&) const; - template + template Rect map(Rect const&) const; Quad map_to_quad(Rect const&) const;