diff --git a/cpr/auth.cpp b/cpr/auth.cpp index f41299d61..dfda86263 100644 --- a/cpr/auth.cpp +++ b/cpr/auth.cpp @@ -2,7 +2,6 @@ #include "cpr/util.h" #include -#include namespace cpr { @@ -13,18 +12,6 @@ Authentication::Authentication(std::string_view username, std::string_view passw auth_string_ += password; } -Authentication::Authentication(Authentication&& old) noexcept : auth_string_{std::move(old.auth_string_)}, auth_mode_{old.auth_mode_} { - old.auth_string_.resize(old.auth_string_.capacity()); -} - -Authentication& Authentication::operator=(Authentication&& old) noexcept { - auth_mode_ = old.auth_mode_; - util::secureStringClear(auth_string_); - auth_string_ = std::move(old.auth_string_); - old.auth_string_.resize(old.auth_string_.capacity()); - return *this; -} - Authentication::~Authentication() noexcept { util::secureStringClear(auth_string_); } diff --git a/include/cpr/auth.h b/include/cpr/auth.h index 55ea0fb84..c93ba64e2 100644 --- a/include/cpr/auth.h +++ b/include/cpr/auth.h @@ -12,10 +12,8 @@ class Authentication { public: Authentication(std::string_view username, std::string_view password, AuthMode auth_mode); Authentication(const Authentication& other) = default; - Authentication(Authentication&& old) noexcept; ~Authentication() noexcept; - Authentication& operator=(Authentication&& old) noexcept; Authentication& operator=(const Authentication& other) = default; const char* GetAuthString() const noexcept;