* Added asserts when building a HeaderList and removed checks for handle

validity.
* Removed explicit move semantic when cloning a MessageBuilder.
* Renamed clone() to try_clone() in ClonablePtr class.
This commit is contained in:
accelerated
2018-12-04 11:12:28 -05:00
parent 6bbddcd5d5
commit 93e066a1c1
5 changed files with 21 additions and 23 deletions

View File

@@ -133,6 +133,9 @@ public:
*/
void set_header_list(const HeaderListType& headers) {
assert(handle_);
if (!headers) {
return; //nothing to set
}
rd_kafka_headers_t* handle_copy = rd_kafka_headers_copy(headers.get_handle());
rd_kafka_message_set_headers(handle_.get(), handle_copy);
header_list_ = HeaderListType::make_non_owning(handle_copy);