Skip to content

Commit 8686134

Browse files
committed
Removed methods with return in args
1 parent 9590198 commit 8686134

File tree

2 files changed

+56
-138
lines changed

2 files changed

+56
-138
lines changed

src/http_request.cpp

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -62,28 +62,24 @@ bool http_request::check_digest_auth(
6262
return true;
6363
}
6464

65-
size_t http_request::get_headers(std::map<std::string, std::string, http::header_comparator>& result) const
65+
const std::map<std::string, std::string, http::header_comparator> http_request::get_headers() const
6666
{
67-
result = this->headers;
68-
return result.size();
67+
return this->headers;
6968
}
7069

71-
size_t http_request::get_footers(std::map<std::string, std::string, http::header_comparator>& result) const
70+
const std::map<std::string, std::string, http::header_comparator> http_request::get_footers() const
7271
{
73-
result = this->footers;
74-
return result.size();
72+
return this->footers;
7573
}
7674

77-
size_t http_request::get_cookies(std::map<std::string, std::string, http::header_comparator>& result) const
75+
const std::map<std::string, std::string, http::header_comparator> http_request::get_cookies() const
7876
{
79-
result = this->cookies;
80-
return result.size();
77+
return this->cookies;
8178
}
8279

83-
size_t http_request::get_args(std::map<std::string, std::string, http::arg_comparator>& result) const
80+
const std::map<std::string, std::string, http::arg_comparator> http_request::get_args() const
8481
{
85-
result = this->args;
86-
return result.size();
82+
return this->args;
8783
}
8884

8985
std::ostream &operator<< (std::ostream &os, const http_request &r)

0 commit comments

Comments
 (0)