mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-06-16 21:15:57 +08:00
优化代码
空构造和析构函数替换为缺省 去除多余分号
This commit is contained in:
@@ -27,8 +27,8 @@ class HttpCookie {
|
||||
public:
|
||||
using Ptr = std::shared_ptr<HttpCookie>;
|
||||
friend class HttpCookieStorage;
|
||||
HttpCookie(){}
|
||||
~HttpCookie(){}
|
||||
HttpCookie() = default;
|
||||
~HttpCookie() = default;
|
||||
|
||||
void setPath(const std::string &path);
|
||||
void setHost(const std::string &host);
|
||||
@@ -52,12 +52,14 @@ private:
|
||||
*/
|
||||
class HttpCookieStorage{
|
||||
public:
|
||||
~HttpCookieStorage(){}
|
||||
~HttpCookieStorage() = default;
|
||||
static HttpCookieStorage &Instance();
|
||||
void set(const HttpCookie::Ptr &cookie);
|
||||
std::vector<HttpCookie::Ptr> get(const std::string &host,const std::string &path);
|
||||
|
||||
private:
|
||||
HttpCookieStorage(){};
|
||||
HttpCookieStorage() = default;
|
||||
|
||||
private:
|
||||
std::unordered_map<std::string/*host*/, std::map<std::string/*cookie path*/,std::map<std::string/*cookie_key*/, HttpCookie::Ptr> > > _all_cookie;
|
||||
std::mutex _mtx_cookie;
|
||||
|
||||
Reference in New Issue
Block a user