mirror of
https://github.com/Retropex/bitcoin.git
synced 2025-06-02 23:42:33 +02:00
Add missing XOnlyPubKey::data() to get mutable data
This is needed for consistency, and also to allow std::span construction from XOnlyPubKey.
This commit is contained in:
parent
2ac2821a74
commit
999962d68d
@ -285,10 +285,11 @@ public:
|
|||||||
CPubKey GetEvenCorrespondingCPubKey() const;
|
CPubKey GetEvenCorrespondingCPubKey() const;
|
||||||
|
|
||||||
const unsigned char& operator[](int pos) const { return *(m_keydata.begin() + pos); }
|
const unsigned char& operator[](int pos) const { return *(m_keydata.begin() + pos); }
|
||||||
const unsigned char* data() const { return m_keydata.begin(); }
|
|
||||||
static constexpr size_t size() { return decltype(m_keydata)::size(); }
|
static constexpr size_t size() { return decltype(m_keydata)::size(); }
|
||||||
|
const unsigned char* data() const { return m_keydata.begin(); }
|
||||||
const unsigned char* begin() const { return m_keydata.begin(); }
|
const unsigned char* begin() const { return m_keydata.begin(); }
|
||||||
const unsigned char* end() const { return m_keydata.end(); }
|
const unsigned char* end() const { return m_keydata.end(); }
|
||||||
|
unsigned char* data() { return m_keydata.begin(); }
|
||||||
unsigned char* begin() { return m_keydata.begin(); }
|
unsigned char* begin() { return m_keydata.begin(); }
|
||||||
unsigned char* end() { return m_keydata.end(); }
|
unsigned char* end() { return m_keydata.end(); }
|
||||||
bool operator==(const XOnlyPubKey& other) const { return m_keydata == other.m_keydata; }
|
bool operator==(const XOnlyPubKey& other) const { return m_keydata == other.m_keydata; }
|
||||||
|
Loading…
Reference in New Issue
Block a user