Fix compile errors on Linux.

This commit is contained in:
Chunting Gu
2018-05-12 09:05:11 +08:00
parent b6ebba771b
commit 5e6f125f90
5 changed files with 51 additions and 45 deletions
+2 -2
View File
@@ -117,7 +117,7 @@ static bool BookFromJson(const std::string& json, Book* book) {
bool BookListService::Handle(const std::string& http_method,
const std::vector<std::string>& url_sub_matches,
const std::map<std::string, std::string>& query,
const webcc::UrlQuery& query,
const std::string& request_content,
std::string* response_content) {
if (http_method == webcc::kHttpGet) {
@@ -150,7 +150,7 @@ bool BookListService::Handle(const std::string& http_method,
bool BookDetailService::Handle(const std::string& http_method,
const std::vector<std::string>& url_sub_matches,
const std::map<std::string, std::string>& query,
const webcc::UrlQuery& query,
const std::string& request_content,
std::string* response_content) {
if (url_sub_matches.size() != 1) {
+3 -3
View File
@@ -13,7 +13,7 @@
// query parameters specified in the URL.
// The URL should be like:
// - /books
// - /books?name={BookName}
// - /books?name={BookName}
// The query parameters could be regular expressions.
class BookListService : public webcc::RestService {
public:
@@ -22,7 +22,7 @@ public:
bool Handle(const std::string& http_method,
const std::vector<std::string>& url_sub_matches,
const std::map<std::string, std::string>& query,
const webcc::UrlQuery& query,
const std::string& request_content,
std::string* response_content) override;
};
@@ -42,7 +42,7 @@ public:
bool Handle(const std::string& http_method,
const std::vector<std::string>& url_sub_matches,
const std::map<std::string, std::string>& query,
const webcc::UrlQuery& query,
const std::string& request_content,
std::string* response_content) override;
};