diff options
author | George Hazan <ghazan@miranda.im> | 2018-04-17 15:56:52 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-04-17 15:56:52 +0300 |
commit | 3e05d92dcb5f6c2017bc462554901ba27816bdb4 (patch) | |
tree | 3276a7c3527006b74afc00c197ab48a3a43b1e9e /protocols/FacebookRM | |
parent | e285d61d903c2616f5a7ea3026a1068ceb59b513 (diff) |
MNonCopyable - the common class to avoid declaring fake private constructors
Diffstat (limited to 'protocols/FacebookRM')
-rw-r--r-- | protocols/FacebookRM/src/http_request.h | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/protocols/FacebookRM/src/http_request.h b/protocols/FacebookRM/src/http_request.h index df79b87b68..f21e5be78c 100644 --- a/protocols/FacebookRM/src/http_request.h +++ b/protocols/FacebookRM/src/http_request.h @@ -18,15 +18,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #ifndef _HTTP_REQUEST_H_ #define _HTTP_REQUEST_H_ -class HttpRequest : public NETLIBHTTPREQUEST, public MZeroedObject +class HttpRequest : public NETLIBHTTPREQUEST, public MZeroedObject, private MNonCopyable { - HttpRequest& operator=(const HttpRequest&); // to prevent copying; - va_list formatArgs; CMStringA url; protected: - class HttpRequestUrl + class HttpRequestUrl : private MNonCopyable { friend HttpRequest; @@ -45,8 +43,6 @@ protected: request.szUrl = request.url.GetBuffer(); } - HttpRequestUrl& operator=(const HttpRequestUrl&); // to prevent copying; - public: HttpRequestUrl& operator<<(const char *param); HttpRequestUrl& operator<<(const BOOL_PARAM ¶m); @@ -60,10 +56,8 @@ protected: } }; - class HttpRequestHeaders + class HttpRequestHeaders : private MNonCopyable { - HttpRequestHeaders& operator=(const HttpRequestHeaders&); // to prevent copying; - HttpRequest &request; void Add(LPCSTR szName) |