mirror of
https://github.com/Zygo/bees.git
synced 2025-05-17 13:25:45 +02:00
string: drop vector_copy_struct, obsoleted by ByteVector
vector_copy_struct constructed a std::vector<uint8_t> from a fixed-size struct. ByteVector replaces std::vector<uint8_t> and has a template constructor which does the same thing as vector_copy_struct, so there is no longer a need for this function. Signed-off-by: Zygo Blaxell <bees@furryterror.org>
This commit is contained in:
parent
b2db140666
commit
fb0e676ee8
@ -19,15 +19,6 @@ namespace crucible {
|
||||
memset(that, 0, sizeof(Base));
|
||||
}
|
||||
|
||||
// Copy a base class object (usually a C struct) into a vector<uint8_t>
|
||||
template <class Base>
|
||||
vector<uint8_t>
|
||||
vector_copy_struct(Base *that)
|
||||
{
|
||||
const uint8_t *begin_that = reinterpret_cast<const uint8_t *>(static_cast<const Base *>(that));
|
||||
return vector<uint8_t>(begin_that, begin_that + sizeof(Base));
|
||||
}
|
||||
|
||||
// int->hex conversion with sprintf
|
||||
string to_hex(uint64_t i);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user