mirror of
https://github.com/Telecominfraproject/wlan-cloud-lib-cppkafka.git
synced 2025-11-01 19:18:04 +00:00
Removed clone_handle method and made ClonablePtr::clone private
This commit is contained in:
@@ -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<bool>(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<T, Deleter> handle_;
|
||||
Cloner cloner_;
|
||||
};
|
||||
|
||||
@@ -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<HeaderType>::get_handle() const {
|
||||
return handle_.get();
|
||||
}
|
||||
|
||||
template <typename HeaderType>
|
||||
rd_kafka_headers_t* HeaderList<HeaderType>::clone_handle() const {
|
||||
return handle_.clone();
|
||||
}
|
||||
|
||||
template <typename HeaderType>
|
||||
rd_kafka_headers_t* HeaderList<HeaderType>::release_handle() {
|
||||
return handle_.release();
|
||||
|
||||
Reference in New Issue
Block a user