summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Schumacher <timschumi@gmx.de>2023-04-12 12:05:39 +0200
committerTim Flynn <trflynn89@pm.me>2023-04-12 07:33:15 -0400
commitadfda6a27101f7bef92f44159b2e2708b373784d (patch)
treeed7eebaba791c40b61adbf44b79e58803153eb52
parent547a08670ee841e81b9b8f66c67bab599f0ce6b4 (diff)
downloadserenity-adfda6a27101f7bef92f44159b2e2708b373784d.zip
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.
-rw-r--r--AK/Endian.h8
1 files changed, 0 insertions, 8 deletions
diff --git a/AK/Endian.h b/AK/Endian.h
index fa05afd7f6..3b4b34aa94 100644
--- a/AK/Endian.h
+++ b/AK/Endian.h
@@ -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 };
};