mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-27 11:43:26 -03:00
prevector: add C++11-like data() method
This returns a pointer to the beginning of the vector's data.
This commit is contained in:
parent
9bc6a6bd7b
commit
47314e6daa
1 changed files with 8 additions and 0 deletions
|
@ -475,6 +475,14 @@ public:
|
||||||
return ((size_t)(sizeof(T))) * _union.capacity;
|
return ((size_t)(sizeof(T))) * _union.capacity;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
value_type* data() noexcept {
|
||||||
|
return item_ptr(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
const value_type* data() const {
|
||||||
|
return item_ptr(0);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
#pragma pack(pop)
|
#pragma pack(pop)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue