diff options
author | practicalswift <practicalswift@users.noreply.github.com> | 2017-07-09 13:05:01 +0200 |
---|---|---|
committer | practicalswift <practicalswift@users.noreply.github.com> | 2017-07-09 13:05:01 +0200 |
commit | 49eb0916da3f07250393111b6bbff080b3d8edd6 (patch) | |
tree | 27675e7bda3a3cdea731c05ee8bb507fb65a0d5e /src/test/scriptnum_tests.cpp | |
parent | 1d4805ce04645f3203b0cfd3d66ea710e7433eb4 (diff) |
[tests] Avoid redundant assignments. Remove unused variables.
Diffstat (limited to 'src/test/scriptnum_tests.cpp')
-rw-r--r-- | src/test/scriptnum_tests.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/test/scriptnum_tests.cpp b/src/test/scriptnum_tests.cpp index 1d5893bdc3..280eb59ce8 100644 --- a/src/test/scriptnum_tests.cpp +++ b/src/test/scriptnum_tests.cpp @@ -29,10 +29,7 @@ static void CheckCreateVch(const int64_t& num) CScriptNum scriptnum(num); BOOST_CHECK(verify(bignum, scriptnum)); - std::vector<unsigned char> vch = bignum.getvch(); - CScriptNum10 bignum2(bignum.getvch(), false); - vch = scriptnum.getvch(); CScriptNum scriptnum2(scriptnum.getvch(), false); BOOST_CHECK(verify(bignum2, scriptnum2)); @@ -90,11 +87,10 @@ static void CheckSubtract(const int64_t& num1, const int64_t& num2) const CScriptNum10 bignum2(num2); const CScriptNum scriptnum1(num1); const CScriptNum scriptnum2(num2); - bool invalid = false; // int64_t overflow is undefined. - invalid = ((num2 > 0 && num1 < std::numeric_limits<int64_t>::min() + num2) || - (num2 < 0 && num1 > std::numeric_limits<int64_t>::max() + num2)); + bool invalid = ((num2 > 0 && num1 < std::numeric_limits<int64_t>::min() + num2) || + (num2 < 0 && num1 > std::numeric_limits<int64_t>::max() + num2)); if (!invalid) { BOOST_CHECK(verify(bignum1 - bignum2, scriptnum1 - scriptnum2)); |