fix memcpy call that gcc is unhappy with

This commit is contained in:
Martin Michelsen
2025-09-11 16:17:38 -07:00
parent 55cbf6e20b
commit 526bfb64e5
4 changed files with 55 additions and 83 deletions
+6 -2
View File
@@ -118,8 +118,12 @@ void send_command_vt(std::shared_ptr<Channel> ch, uint16_t command, uint32_t fla
}
template <typename TargetT, typename StructT, typename EntryT>
void send_command_t_vt(std::shared_ptr<TargetT> c, uint16_t command,
uint32_t flag, const StructT& data, const std::vector<EntryT>& array_data) {
void send_command_t_vt(
std::shared_ptr<TargetT> c,
uint16_t command,
uint32_t flag,
const StructT& data,
const std::vector<EntryT>& array_data) {
std::string all_data(reinterpret_cast<const char*>(&data), sizeof(StructT));
all_data.append(reinterpret_cast<const char*>(array_data.data()),
array_data.size() * sizeof(EntryT));