diff options
author | kleines Filmröllchen <malu.bertsch@gmail.com> | 2021-08-26 03:05:01 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-09-12 23:38:57 +0200 |
commit | 2909c3a931439d0cbed3e4599d9eed47a6fdb446 (patch) | |
tree | 7225ae3240891771213dec6da5366e0512781dfa /Userland/Libraries/LibIPC/Decoder.cpp | |
parent | 6c5fb2ca63b300b748f7b8e66efa532a450b0a58 (diff) | |
download | serenity-2909c3a931439d0cbed3e4599d9eed47a6fdb446.zip |
LibIPC: Add support for transferring doubles over IPC messages
I'm still wondering why nobody did this yet :^) Also changes the use of
unions for the more cleaner / less undefined AK::bit_cast.
Diffstat (limited to 'Userland/Libraries/LibIPC/Decoder.cpp')
-rw-r--r-- | Userland/Libraries/LibIPC/Decoder.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Userland/Libraries/LibIPC/Decoder.cpp b/Userland/Libraries/LibIPC/Decoder.cpp index 677bf69e02..4a2093b78c 100644 --- a/Userland/Libraries/LibIPC/Decoder.cpp +++ b/Userland/Libraries/LibIPC/Decoder.cpp @@ -78,6 +78,12 @@ bool Decoder::decode(float& value) return !m_stream.handle_any_error(); } +bool Decoder::decode(double& value) +{ + m_stream >> value; + return !m_stream.handle_any_error(); +} + bool Decoder::decode(String& value) { i32 length = 0; |