Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support for MSVC 2015 #365

Merged
merged 4 commits into from
Feb 26, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Format and Update Trantor
  • Loading branch information
an-tao committed Feb 26, 2020
commit 40e9ec0db3979dfdcea34b9a6f7300b42ce732fe
4 changes: 2 additions & 2 deletions lib/inc/drogon/HttpRequest.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ HttpRequestPtr toRequest(Json::Value &&pJson);
template <>
inline HttpRequestPtr toRequest<Json::Value &>(Json::Value &pJson)
{
return toRequest((const Json::Value &)pJson);
return toRequest((const Json::Value &)pJson);
}

template <>
Expand Down Expand Up @@ -361,7 +361,7 @@ class HttpRequest
template <typename T>
static HttpRequestPtr newCustomHttpRequest(T &&obj)
{
return toRequest(std::forward<T>(obj));
return toRequest(std::forward<T>(obj));
}

virtual bool isOnSecureConnection() const noexcept = 0;
Expand Down
2 changes: 1 addition & 1 deletion lib/inc/drogon/HttpResponse.h
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ class HttpResponse
virtual void setBody(const char *body, size_t len) = 0;
};
template <>
inline HttpResponsePtr toResponse<const Json::Value&>(const Json::Value &pJson)
inline HttpResponsePtr toResponse<const Json::Value &>(const Json::Value &pJson)
{
return HttpResponse::newHttpJsonResponse(pJson);
}
Expand Down
10 changes: 4 additions & 6 deletions lib/src/HttpAppFrameworkImpl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -88,19 +88,17 @@ HttpAppFrameworkImpl::HttpAppFrameworkImpl()
{
}


static std::function<void()> f = []{
static std::function<void()> f = [] {
LOG_TRACE << "Initialize the main event loop in the main thread";
};


/// Make sure that the main event loop is initialized in the main thread.
drogon::InitBeforeMainFunction drogon::HttpAppFrameworkImpl::initFirst_([]() {
HttpAppFrameworkImpl::instance().getLoop()->runInLoop(
f
// []() {
// LOG_TRACE << "Initialize the main event loop in the main thread";
//}
// []() {
// LOG_TRACE << "Initialize the main event loop in the main thread";
//}
);
});

Expand Down
2 changes: 1 addition & 1 deletion orm_lib/inc/drogon/orm/ResultIterator.h
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ class ConstReverseResultIterator : private ConstResultIterator
using iterator_type::iterator_category;
using iterator_type::pointer;
using iterator_type::reference;
// using iterator_type::value_type;
// using iterator_type::value_type;

ConstReverseResultIterator(const ConstReverseResultIterator &rhs)
: ConstResultIterator(rhs)
Expand Down
2 changes: 1 addition & 1 deletion orm_lib/inc/drogon/orm/RowIterator.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ class ConstReverseRowIterator : private ConstRowIterator
using iterator_type::iterator_category;
using iterator_type::pointer;
using iterator_type::reference;
// using iterator_type::value_type;
// using iterator_type::value_type;

ConstReverseRowIterator(const ConstReverseRowIterator &rhs)
: ConstRowIterator(rhs)
Expand Down
2 changes: 1 addition & 1 deletion trantor