mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-14 13:32:23 +00:00
LibGfx: Spell IPCEncode::encode definitions instead of abusing concepts
The original approach failed to link with LLVM 18 because of the changed symbol mangling.
This commit is contained in:
parent
1159cd9390
commit
d282066ba4
Notes:
sideshowbarker
2024-07-17 09:48:50 +09:00
Author: https://github.com/BertalanD
Commit: d282066ba4
Pull-request: https://github.com/SerenityOS/serenity/pull/23960
Reviewed-by: https://github.com/ADKaster ✅
Reviewed-by: https://github.com/DanShaders
Reviewed-by: https://github.com/alimpfard
1 changed files with 9 additions and 4 deletions
|
@ -51,16 +51,21 @@ ByteString FloatPoint::to_byte_string() const
|
|||
|
||||
namespace IPC {
|
||||
|
||||
template<OneOf<Gfx::IntPoint, Gfx::FloatPoint> Point>
|
||||
ErrorOr<void> encode(Encoder& encoder, Point const& point)
|
||||
template<>
|
||||
ErrorOr<void> encode(Encoder& encoder, Gfx::IntPoint const& point)
|
||||
{
|
||||
TRY(encoder.encode(point.x()));
|
||||
TRY(encoder.encode(point.y()));
|
||||
return {};
|
||||
}
|
||||
|
||||
template ErrorOr<void> encode(Encoder&, Gfx::IntPoint const& point);
|
||||
template ErrorOr<void> encode(Encoder&, Gfx::FloatPoint const& point);
|
||||
template<>
|
||||
ErrorOr<void> encode(Encoder& encoder, Gfx::FloatPoint const& point)
|
||||
{
|
||||
TRY(encoder.encode(point.x()));
|
||||
TRY(encoder.encode(point.y()));
|
||||
return {};
|
||||
}
|
||||
|
||||
template<>
|
||||
ErrorOr<Gfx::IntPoint> decode(Decoder& decoder)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue