aboutsummaryrefslogtreecommitdiff
path: root/src/qt
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2017-02-15 09:26:12 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2017-02-15 09:27:47 +0100
commit4c69d683f22ad8bc310c901b50b8892da7a3c70c (patch)
treedd6fa87b3f96b2bf3bd39cfb3598a1dfea2f3c74 /src/qt
parenta441db01b527431a3d7ba169f1afd9c3bc04748f (diff)
parenta47da4b6fecaba81dafe777b25be24e04a428e37 (diff)
Merge #9553: Use z = std::max(x - y, 0) instead of z = x - y; if (z < 0) z = 0;
a47da4b Use z = std::max(x - y, 0); instead of z = x - y; if (z < 0) z = 0; (practicalswift)
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