aboutsummaryrefslogtreecommitdiff
path: root/src/qt
diff options
context:
space:
mode:
authorpracticalswift <practicalswift@users.noreply.github.com>2017-02-03 09:20:54 +0100
committerpracticalswift <practicalswift@users.noreply.github.com>2017-02-07 15:46:38 +0100
commita47da4b6fecaba81dafe777b25be24e04a428e37 (patch)
tree2ef78a9d89b312b71aa06316443ce2de96d58c8e /src/qt
parentb709fe7ffc44ae14bbd2403cdfbfa4fcf94cef6b (diff)
Use z = std::max(x - y, 0); instead of z = x - y; if (z < 0) z = 0;
Diffstat (limited to 'src/qt')
-rw-r--r--src/qt/coincontroldialog.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/qt/coincontroldialog.cpp b/src/qt/coincontroldialog.cpp
index f8aba70d92..d4fd8bd372 100644
--- a/src/qt/coincontroldialog.cpp
+++ b/src/qt/coincontroldialog.cpp
@@ -563,9 +563,7 @@ void CoinControlDialog::updateLabels(WalletModel *model, QDialog* dialog)
}
// after fee
- nAfterFee = nAmount - nPayFee;
- if (nAfterFee < 0)
- nAfterFee = 0;
+ nAfterFee = std::max<CAmount>(nAmount - nPayFee, 0);
}
// actually update labels