mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-10-26 14:57:54 +03:00
AK: Remove the Endian bytes accessor
This is a remnant from when we didn't have a `read_value` and `write_value` implementation for `AK::Endian` and instead used the generic functions for reading a span of bytes. Now that we have a more ergonomic alternative, remove the helper that is no longer needed.
This commit is contained in:
parent
547a08670e
commit
adfda6a271
Notes:
sideshowbarker
2024-07-17 06:38:11 +09:00
Author: https://github.com/timschumi Commit: https://github.com/SerenityOS/serenity/commit/adfda6a271 Pull-request: https://github.com/SerenityOS/serenity/pull/18311 Reviewed-by: https://github.com/trflynn89 ✅
@ -88,10 +88,6 @@ public:
|
||||
|
||||
constexpr operator T() const { return convert_between_host_and_little_endian(m_value); }
|
||||
|
||||
// This returns the internal representation. In this case, that is the value stored in little endian format.
|
||||
constexpr Bytes bytes() { return Bytes { &m_value, sizeof(m_value) }; }
|
||||
constexpr ReadonlyBytes bytes() const { return ReadonlyBytes { &m_value, sizeof(m_value) }; }
|
||||
|
||||
private:
|
||||
T m_value { 0 };
|
||||
};
|
||||
@ -108,10 +104,6 @@ public:
|
||||
|
||||
constexpr operator T() const { return convert_between_host_and_big_endian(m_value); }
|
||||
|
||||
// This returns the internal representation. In this case, that is the value stored in big endian format.
|
||||
constexpr Bytes bytes() { return Bytes { &m_value, sizeof(m_value) }; }
|
||||
constexpr ReadonlyBytes bytes() const { return ReadonlyBytes { &m_value, sizeof(m_value) }; }
|
||||
|
||||
private:
|
||||
T m_value { 0 };
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user