mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-25 09:00:22 +00:00
LibCore: Fix up type mistakes in Stream::read_trivial_value
This commit is contained in:
parent
3b824ec8c9
commit
6777cb0975
Notes:
sideshowbarker
2024-07-17 08:45:34 +09:00
Author: https://github.com/timschumi Commit: https://github.com/SerenityOS/serenity/commit/6777cb0975 Pull-request: https://github.com/SerenityOS/serenity/pull/17029 Reviewed-by: https://github.com/trflynn89 ✅
1 changed files with 2 additions and 2 deletions
|
@ -113,8 +113,8 @@ public:
|
|||
ErrorOr<T> read_trivial_value()
|
||||
{
|
||||
alignas(T) u8 buffer[sizeof(T)] = {};
|
||||
TRY(read_entire_buffer(buffer));
|
||||
return *bit_cast<T>(buffer);
|
||||
TRY(read_entire_buffer({ &buffer, sizeof(buffer) }));
|
||||
return bit_cast<T>(buffer);
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
|
|
Loading…
Reference in a new issue