mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 12:17:44 +00:00
LibCore: Fix up type mistakes in Stream::read_trivial_value
This commit is contained in:
parent
3b824ec8c9
commit
6777cb0975
1 changed files with 2 additions and 2 deletions
|
@ -113,8 +113,8 @@ public:
|
||||||
ErrorOr<T> read_trivial_value()
|
ErrorOr<T> read_trivial_value()
|
||||||
{
|
{
|
||||||
alignas(T) u8 buffer[sizeof(T)] = {};
|
alignas(T) u8 buffer[sizeof(T)] = {};
|
||||||
TRY(read_entire_buffer(buffer));
|
TRY(read_entire_buffer({ &buffer, sizeof(buffer) }));
|
||||||
return *bit_cast<T>(buffer);
|
return bit_cast<T>(buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue