Delete all copy and move constructors.

I'll think about them later.
This commit is contained in:
tastytea 2020-11-13 19:35:10 +01:00
parent 194e729b29
commit 6f6de3ad5f
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07
2 changed files with 7 additions and 26 deletions

View File

@ -31,7 +31,7 @@ namespace curl_wrapper
inline static std::atomic<std::uint64_t> curlwrapper_instances{0}; inline static std::atomic<std::uint64_t> curlwrapper_instances{0};
void CURLWrapper::init() CURLWrapper::CURLWrapper()
{ {
if (curlwrapper_instances == 0) if (curlwrapper_instances == 0)
{ {

View File

@ -51,24 +51,12 @@ public:
* *
* @since 0.1.0 * @since 0.1.0
*/ */
CURLWrapper() CURLWrapper();
: _connection{nullptr}
{
init();
}
/*! //! Copy constructor. @since 0.1.0
* @brief Copy constructor. Does the same as the Constructor. CURLWrapper(const CURLWrapper &other) = delete;
*
* @since 0.1.0
*/
CURLWrapper(const CURLWrapper &)
: _connection{nullptr}
{
init();
}
//! Move constructor //! Move constructor @since 0.1.0
CURLWrapper(CURLWrapper &&other) noexcept = delete; CURLWrapper(CURLWrapper &&other) noexcept = delete;
/*! /*!
@ -83,10 +71,10 @@ public:
*/ */
virtual ~CURLWrapper() noexcept; virtual ~CURLWrapper() noexcept;
//! Copy assignment operator //! Copy assignment operator @since 0.1.0
CURLWrapper &operator=(const CURLWrapper &other) = delete; CURLWrapper &operator=(const CURLWrapper &other) = delete;
//! Move assignment operator //! Move assignment operator @since 0.1.0
CURLWrapper &operator=(CURLWrapper &&other) noexcept = delete; CURLWrapper &operator=(CURLWrapper &&other) noexcept = delete;
/*! /*!
@ -186,13 +174,6 @@ private:
string _buffer_headers; string _buffer_headers;
string _buffer_body; string _buffer_body;
/*!
* @brief Initializes curl and sets up connection.
*
* @since 0.1.0
*/
void init();
/*! /*!
* @brief libcurl write callback function. * @brief libcurl write callback function.
* *