diff --git a/include/cppkafka/clonable_ptr.h b/include/cppkafka/clonable_ptr.h index 6f175ff..4f0f323 100644 --- a/include/cppkafka/clonable_ptr.h +++ b/include/cppkafka/clonable_ptr.h @@ -91,13 +91,6 @@ public: return handle_.get(); } - /** - * \brief Clones the internal pointer using the specified cloner function. - */ - T* clone() const { - return cloner_ ? cloner_(handle_.get()) : handle_.get(); - } - /** * \brief Releases ownership of the internal pointer */ @@ -133,6 +126,13 @@ public: return static_cast(handle_); } private: + /** + * \brief Clones the internal pointer using the specified cloner function. + */ + T* clone() const { + return cloner_ ? cloner_(handle_.get()) : handle_.get(); + } + std::unique_ptr handle_; Cloner cloner_; }; diff --git a/include/cppkafka/header_list.h b/include/cppkafka/header_list.h index 384fce5..1d3b3b0 100644 --- a/include/cppkafka/header_list.h +++ b/include/cppkafka/header_list.h @@ -146,12 +146,6 @@ public: */ rd_kafka_headers_t* get_handle() const; - /** - * \brief Clone the underlying header list handle. - * \return The handle. - */ - rd_kafka_headers_t* clone_handle() const; - /** * \brief Get the underlying header list handle and release its ownership. * \return The handle. @@ -310,11 +304,6 @@ rd_kafka_headers_t* HeaderList::get_handle() const { return handle_.get(); } -template -rd_kafka_headers_t* HeaderList::clone_handle() const { - return handle_.clone(); -} - template rd_kafka_headers_t* HeaderList::release_handle() { return handle_.release();