minor improvements
This commit is contained in:
parent
b9df8cdb02
commit
b102dfee4b
@ -31,9 +31,7 @@ requester::requester() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
requester::~requester() {
|
requester::~requester() {
|
||||||
if (_h) {
|
curl_easy_cleanup(_h);
|
||||||
curl_easy_cleanup(_h);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
requester::requester(requester&& other) {
|
requester::requester(requester&& other) {
|
||||||
@ -43,9 +41,7 @@ requester::requester(requester&& other) {
|
|||||||
|
|
||||||
requester& requester::operator=(requester &&other) {
|
requester& requester::operator=(requester &&other) {
|
||||||
if (this != &other) {
|
if (this != &other) {
|
||||||
if (_h) {
|
curl_easy_cleanup(_h);
|
||||||
curl_easy_cleanup(_h);
|
|
||||||
}
|
|
||||||
_h = other._h;
|
_h = other._h;
|
||||||
other._h = nullptr;
|
other._h = nullptr;
|
||||||
}
|
}
|
||||||
|
@ -34,7 +34,7 @@ class requester {
|
|||||||
std::string get(const std::string& url);
|
std::string get(const std::string& url);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
CURL* _h; // curl handle
|
CURL* _h {nullptr}; // curl handle
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // _requester_H_
|
#endif // _requester_H_
|
||||||
|
Loading…
x
Reference in New Issue
Block a user