diff --git a/orm_lib/inc/drogon/orm/SqlBinder.h b/orm_lib/inc/drogon/orm/SqlBinder.h index 282657fb6d..92745a127e 100644 --- a/orm_lib/inc/drogon/orm/SqlBinder.h +++ b/orm_lib/inc/drogon/orm/SqlBinder.h @@ -361,22 +361,22 @@ class DROGON_EXPORT SqlBinder : public trantor::NonCopyable // LOG_DEBUG << "ptr callback"; isExceptionPtr_ = true; exceptionPtrCallback_ = std::forward(callback); - return *this; } else { isExceptionPtr_ = false; exceptionCallback_ = std::forward(callback); - return *this; } } - else if constexpr (traits::isSqlCallback) + + if constexpr (traits::isSqlCallback) { callbackHolder_ = std::shared_ptr( new CallbackHolder::type>( std::forward(callback))); - return *this; } + + return *this; } template