2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Clear callbacks async in MTP::Instance.

Also fix previous build.
This commit is contained in:
John Preston
2018-01-02 16:44:12 +03:00
parent 3325106837
commit 06c724df01
6 changed files with 103 additions and 76 deletions

View File

@@ -270,7 +270,9 @@ private:
};
struct RPCCallbackClear {
RPCCallbackClear(mtpRequestId id = 0, int32 code = RPCError::NoError) : requestId(id), errorCode(code) {
RPCCallbackClear(mtpRequestId id , int32 code = RPCError::NoError)
: requestId(id)
, errorCode(code) {
}
mtpRequestId requestId;
@@ -278,8 +280,6 @@ struct RPCCallbackClear {
};
using RPCCallbackClears = QVector<RPCCallbackClear> ;
template <typename TReturn>
inline RPCDoneHandlerPtr rpcDone(TReturn (*onDone)(const mtpPrime *, const mtpPrime *)) { // done(from, end)
return RPCDoneHandlerPtr(new RPCDoneHandlerBare<TReturn>(onDone));