lib/curl: add "noexcept"
This commit is contained in:
@@ -58,25 +58,26 @@ public:
|
||||
/**
|
||||
* Create an empty instance.
|
||||
*/
|
||||
CurlEasy(std::nullptr_t):handle(nullptr) {}
|
||||
CurlEasy(std::nullptr_t) noexcept:handle(nullptr) {}
|
||||
|
||||
CurlEasy(CurlEasy &&src):handle(std::exchange(src.handle, nullptr)) {}
|
||||
CurlEasy(CurlEasy &&src) noexcept
|
||||
:handle(std::exchange(src.handle, nullptr)) {}
|
||||
|
||||
~CurlEasy() {
|
||||
~CurlEasy() noexcept {
|
||||
if (handle != nullptr)
|
||||
curl_easy_cleanup(handle);
|
||||
}
|
||||
|
||||
operator bool() const {
|
||||
operator bool() const noexcept {
|
||||
return handle != nullptr;
|
||||
}
|
||||
|
||||
CurlEasy &operator=(CurlEasy &&src) {
|
||||
CurlEasy &operator=(CurlEasy &&src) noexcept {
|
||||
std::swap(handle, src.handle);
|
||||
return *this;
|
||||
}
|
||||
|
||||
CURL *Get() {
|
||||
CURL *Get() noexcept {
|
||||
return handle;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user