diff options
author | Andreas Kling <kling@serenityos.org> | 2020-03-29 19:03:13 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-03-29 19:37:23 +0200 |
commit | 24a0354ce84c6c839930788bc772736f7c56ae18 (patch) | |
tree | 535fd6235b4858da2f5d918d079481582a0a0102 /Libraries/LibGfx/Rect.cpp | |
parent | 01ff36a2f41e87d908f195c1cd517ff45d89e580 (diff) | |
download | serenity-24a0354ce84c6c839930788bc772736f7c56ae18.zip |
LibIPC+LibGfx: Pass the IPC::Decoder to decoding helpers
Instead of passing the BufferStream, pass the Decoder. I'd like to stop
using BufferStream eventually anyway, so it's good to get it out of any
API's where it's in currently.
Diffstat (limited to 'Libraries/LibGfx/Rect.cpp')
-rw-r--r-- | Libraries/LibGfx/Rect.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Libraries/LibGfx/Rect.cpp b/Libraries/LibGfx/Rect.cpp index 5c39b15789..e3ec19b37b 100644 --- a/Libraries/LibGfx/Rect.cpp +++ b/Libraries/LibGfx/Rect.cpp @@ -28,6 +28,7 @@ #include <AK/String.h> #include <AK/Vector.h> #include <LibGfx/Rect.h> +#include <LibIPC/Decoder.h> namespace Gfx { @@ -145,13 +146,13 @@ const LogStream& operator<<(const LogStream& stream, const Rect& value) namespace IPC { -bool decode(BufferStream& stream, Gfx::Rect& rect) +bool decode(Decoder& decoder, Gfx::Rect& rect) { Gfx::Point point; Gfx::Size size; - if (!decode(stream, point)) + if (!decoder.decode(point)) return false; - if (!decode(stream, size)) + if (!decoder.decode(size)) return false; rect = { point, size }; return true; |