Skip to content

Commit d0f077f

Browse files
committed
Clear flags immediately instead of at the scope exit.
1 parent aedce2c commit d0f077f

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

td/telegram/StarManager.cpp

+3-9
Original file line numberDiff line numberDiff line change
@@ -334,15 +334,11 @@ class GetStarsTransactionsQuery final : public Td::ResultHandler {
334334
transaction->transaction_url_);
335335
}
336336
if (transaction->pending_) {
337-
SCOPE_EXIT {
338-
transaction->pending_ = false;
339-
};
337+
transaction->pending_ = false;
340338
return td_api::make_object<td_api::revenueWithdrawalStatePending>();
341339
}
342340
if (transaction->failed_) {
343-
SCOPE_EXIT {
344-
transaction->failed_ = false;
345-
};
341+
transaction->failed_ = false;
346342
return td_api::make_object<td_api::revenueWithdrawalStateFailed>();
347343
}
348344
return nullptr;
@@ -444,9 +440,7 @@ class GetStarsTransactionsQuery final : public Td::ResultHandler {
444440
}
445441
if (transaction->reaction_) {
446442
if (for_channel) {
447-
SCOPE_EXIT {
448-
transaction->reaction_ = false;
449-
};
443+
transaction->reaction_ = false;
450444
return td_api::make_object<td_api::starTransactionTypeChannelPaidReactionReceive>(
451445
user_id_object, get_message_id_object());
452446
}

0 commit comments

Comments
 (0)