mirror of
https://github.com/oatpp/oatpp.git
synced 2025-02-05 17:09:38 +08:00
Merge branch 'fix_coroutine_member_caller' of https://github.com/oatpp/oatpp
This commit is contained in:
commit
08fc107269
9
.gitignore
vendored
9
.gitignore
vendored
@ -35,11 +35,16 @@
|
||||
|
||||
**/.DS_Store
|
||||
|
||||
#idea
|
||||
# idea
|
||||
.idea/
|
||||
cmake-build-debug/
|
||||
|
||||
#local build
|
||||
# local build
|
||||
build/
|
||||
srt/build/
|
||||
test/build/
|
||||
|
||||
# Docker
|
||||
|
||||
Dockerfile
|
||||
|
||||
|
@ -397,9 +397,9 @@ public:
|
||||
{}
|
||||
|
||||
template<typename ReturnType, typename T, typename ...Args>
|
||||
ReturnType call(ReturnType (T::*f)(), Args... args){
|
||||
ReturnType call(ReturnType (T::*f)(), const Args&... args){
|
||||
MemberCaller* caller = static_cast<MemberCaller*>(m_objectPtr);
|
||||
return (caller->*reinterpret_cast<ReturnType (MemberCaller::*)(Args...)>(f))(args...);
|
||||
return (caller->*reinterpret_cast<ReturnType (MemberCaller::*)(const Args&...)>(f))(args...);
|
||||
}
|
||||
|
||||
};
|
||||
@ -466,7 +466,7 @@ public:
|
||||
virtual Action handleError(const std::shared_ptr<const Error>& error);
|
||||
|
||||
template<typename ...Args>
|
||||
Action callWithParams(FunctionPtr ptr, Args... args) {
|
||||
Action callWithParams(FunctionPtr ptr, const Args&... args) {
|
||||
return getMemberCaller().call<Action>(ptr, args...);
|
||||
}
|
||||
|
||||
@ -800,7 +800,7 @@ public:
|
||||
* @param args - argumets to be passed to callback.
|
||||
* @return - finish Action.
|
||||
*/
|
||||
Action _return(Args... args) {
|
||||
Action _return(const Args&... args) {
|
||||
m_parentReturnAction = getParent()->callWithParams(m_callback, args...);
|
||||
return Action::createActionByType(Action::TYPE_FINISH);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user