Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- template <typename T>
- void fillVector(std::vector<uint8_t>& dest, T t)
- {
- auto ptr = reinterpret_cast<uint8_t*>(&t);
- dest.insert(dest.end(),ptr,ptr+sizeof(t));
- }
- fillVector<uint32_t>(dst,32bitdata);
- fillVector<uint16_t>(dst,16bitdata);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement