minor improvements
This commit is contained in:
parent
b9df8cdb02
commit
b102dfee4b
@ -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;
|
||||
}
|
||||
|
@ -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_
|
||||
|
Loading…
x
Reference in New Issue
Block a user