Delete all copy and move constructors.
I'll think about them later.
This commit is contained in:
parent
194e729b29
commit
6f6de3ad5f
|
@ -31,7 +31,7 @@ namespace curl_wrapper
|
|||
|
||||
inline static std::atomic<std::uint64_t> curlwrapper_instances{0};
|
||||
|
||||
void CURLWrapper::init()
|
||||
CURLWrapper::CURLWrapper()
|
||||
{
|
||||
if (curlwrapper_instances == 0)
|
||||
{
|
||||
|
|
|
@ -51,24 +51,12 @@ public:
|
|||
*
|
||||
* @since 0.1.0
|
||||
*/
|
||||
CURLWrapper()
|
||||
: _connection{nullptr}
|
||||
{
|
||||
init();
|
||||
}
|
||||
CURLWrapper();
|
||||
|
||||
/*!
|
||||
* @brief Copy constructor. Does the same as the Constructor.
|
||||
*
|
||||
* @since 0.1.0
|
||||
*/
|
||||
CURLWrapper(const CURLWrapper &)
|
||||
: _connection{nullptr}
|
||||
{
|
||||
init();
|
||||
}
|
||||
//! Copy constructor. @since 0.1.0
|
||||
CURLWrapper(const CURLWrapper &other) = delete;
|
||||
|
||||
//! Move constructor
|
||||
//! Move constructor @since 0.1.0
|
||||
CURLWrapper(CURLWrapper &&other) noexcept = delete;
|
||||
|
||||
/*!
|
||||
|
@ -83,10 +71,10 @@ public:
|
|||
*/
|
||||
virtual ~CURLWrapper() noexcept;
|
||||
|
||||
//! Copy assignment operator
|
||||
//! Copy assignment operator @since 0.1.0
|
||||
CURLWrapper &operator=(const CURLWrapper &other) = delete;
|
||||
|
||||
//! Move assignment operator
|
||||
//! Move assignment operator @since 0.1.0
|
||||
CURLWrapper &operator=(CURLWrapper &&other) noexcept = delete;
|
||||
|
||||
/*!
|
||||
|
@ -186,13 +174,6 @@ private:
|
|||
string _buffer_headers;
|
||||
string _buffer_body;
|
||||
|
||||
/*!
|
||||
* @brief Initializes curl and sets up connection.
|
||||
*
|
||||
* @since 0.1.0
|
||||
*/
|
||||
void init();
|
||||
|
||||
/*!
|
||||
* @brief libcurl write callback function.
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue