1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 07:37:46 +00:00

LibGfx: Mark AffineTransform<T>::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.
This commit is contained in:
Sam Atkins 2022-10-19 17:09:12 +01:00 committed by Linus Groh
parent 732aa2c5c7
commit e5a25171fe

View file

@ -6,6 +6,7 @@
#pragma once #pragma once
#include <AK/Concepts.h>
#include <AK/Format.h> #include <AK/Format.h>
#include <AK/Forward.h> #include <AK/Forward.h>
#include <LibGfx/Forward.h> #include <LibGfx/Forward.h>
@ -29,13 +30,13 @@ public:
void map(float unmapped_x, float unmapped_y, float& mapped_x, float& mapped_y) const; void map(float unmapped_x, float unmapped_y, float& mapped_x, float& mapped_y) const;
template<typename T> template<Arithmetic T>
Point<T> map(Point<T> const&) const; Point<T> map(Point<T> const&) const;
template<typename T> template<Arithmetic T>
Size<T> map(Size<T> const&) const; Size<T> map(Size<T> const&) const;
template<typename T> template<Arithmetic T>
Rect<T> map(Rect<T> const&) const; Rect<T> map(Rect<T> const&) const;
Quad<float> map_to_quad(Rect<float> const&) const; Quad<float> map_to_quad(Rect<float> const&) const;