diff options
author | Michael Lutz <michi@icosahedron.de> | 2021-10-28 23:48:26 +0200 |
---|---|---|
committer | Michael Lutz <michi@icosahedron.de> | 2021-12-16 22:28:32 +0100 |
commit | a05fd7aa50ecbee425df2d6f9015ec3ea359232f (patch) | |
tree | 9b9208d39813670789635b638592a903a2aafaa4 /src/core/span_type.hpp | |
parent | b0990fcff7358e839468e5cf811ffddc8b9d73e2 (diff) | |
download | openttd-a05fd7aa50ecbee425df2d6f9015ec3ea359232f.tar.xz |
Change: [Network] Transfer command data as serialized byte stream without fixed structure.
The data will be transmitted as the length followed by the serialized data. This allows the command
data to be different for every command type in the future.
Diffstat (limited to 'src/core/span_type.hpp')
-rw-r--r-- | src/core/span_type.hpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/core/span_type.hpp b/src/core/span_type.hpp index 614be8456..0df528816 100644 --- a/src/core/span_type.hpp +++ b/src/core/span_type.hpp @@ -92,6 +92,8 @@ public: constexpr const_iterator cbegin() const noexcept { return const_iterator(first); } constexpr const_iterator cend() const noexcept { return const_iterator(last); } + constexpr reference operator[](size_type idx) const { return first[idx]; } + private: pointer first; pointer last; |