Skip to content

Commit

Permalink
[qt] Remove assignment in if statement
Browse files Browse the repository at this point in the history
Summary:
This serves 2 purposes:
 1. It is much more readable
 2. It works around a discrepancy between clang-format 12.0.0 and 12.0.1

There is no change in behavior.

Test Plan:
  ninja check-bitcoin-qt

Send a tx to check the modals work as intended

Reviewers: #bitcoin_abc, PiRK

Reviewed By: #bitcoin_abc, PiRK

Differential Revision: https://reviews.bitcoinabc.org/D14591
  • Loading branch information
Fabcien committed Oct 4, 2023
1 parent 7b7220a commit 60349c3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/qt/bitcoingui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1245,9 +1245,9 @@ void BitcoinGUI::message(const QString &title, QString message,

if (style & CClientUIInterface::MODAL) {
// Check for buttons, use OK as default, if none was supplied
QMessageBox::StandardButton buttons;
if (!(buttons = (QMessageBox::StandardButton)(
style & CClientUIInterface::BTN_MASK))) {
auto buttons = static_cast<QMessageBox::StandardButton>(
style & CClientUIInterface::BTN_MASK);
if (buttons) {
buttons = QMessageBox::Ok;
}

Expand Down

0 comments on commit 60349c3

Please sign in to comment.