Modernize the Address class (and all the Addresses)
This is related to #1231, so the two could be tackled together.
The Address class stores the address bytes in:
uint8_t m_data[MAX_SIZE]; //!< The address valueThis should be converted in
std::array<uint8_t, MAX_SIZE> m_data; //!< The address valueThe benefits are obvious:
- The default comparison operators will work, as two
arrays can be compared lexicographically. - Copy operators can be removed, as the default ones will do the right thing.
- Initializing an array to 0 is simpler.
- Copying 2 arrays of different length is a 1-line instruction (caveats apply)
- etcetera
A good MR should:
- Modify the data type
- Remove the redundant functions
- Add some functions (if needed), like initializing the address from an array
Additionally, one could explore if some functions could be deprecated, like the initialization from "C-style" arrays.
Removing the custom comparison operators (i.e., fixing #1231 for the addresses) is a bonus, but it should come naturally.