| 79 | } |
| 80 | |
| 81 | void serializer::set_data(byte_t* _data, uint32_t _capacity) { |
| 82 | data_.clear(); |
| 83 | try { |
| 84 | data_.insert(data_.end(), _data, _data + _capacity); |
| 85 | } catch (const std::bad_alloc& e) { |
| 86 | VSOMEIP_ERROR << "Couldn't allocate memory in serializer::set_data" << e.what(); |
| 87 | } |
| 88 | } |
| 89 | |
| 90 | void serializer::reset() { |
| 91 | if (buffer_shrink_threshold_) { |