minor improvements

This commit is contained in:
Bob Polis 2020-09-02 11:25:13 +02:00
parent b9df8cdb02
commit b102dfee4b
2 changed files with 3 additions and 7 deletions

View File

@ -31,10 +31,8 @@ requester::requester() {
}
requester::~requester() {
if (_h) {
curl_easy_cleanup(_h);
}
}
requester::requester(requester&& other) {
_h = other._h;
@ -43,9 +41,7 @@ requester::requester(requester&& other) {
requester& requester::operator=(requester &&other) {
if (this != &other) {
if (_h) {
curl_easy_cleanup(_h);
}
_h = other._h;
other._h = nullptr;
}

View File

@ -34,7 +34,7 @@ class requester {
std::string get(const std::string& url);
private:
CURL* _h; // curl handle
CURL* _h {nullptr}; // curl handle
};
#endif // _requester_H_