diff options
author | Orgad Shaneh <orgad.shaneh@audiocodes.com> | 2017-05-03 08:36:50 +0300 |
---|---|---|
committer | Orgad Shaneh <orgads@gmail.com> | 2017-05-16 14:18:49 +0000 |
commit | 6d6c0c81edc750e2ac7f9fd4f4772f6d85507464 (patch) | |
tree | 7c9bf8cb67b3671a2b1837668dfc457f2424013f /tests/manual/debugger | |
parent | eb184ff052966029deac5691276c4733fe97b2df (diff) |
Tests: Minor cleanup in debugger/simple_test_app
* Replace double casts with ll suffix, which resolves the warning.
* Replace recurring shifts by using a local variable.
Change-Id: I344fab50619dc27e68a151abb2f3061543c36662
Reviewed-by: hjk <hjk@qt.io>
Diffstat (limited to 'tests/manual/debugger')
-rw-r--r-- | tests/manual/debugger/simple/simple_test_app.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/tests/manual/debugger/simple/simple_test_app.cpp b/tests/manual/debugger/simple/simple_test_app.cpp index 425ce874afd..3bbe0d55201 100644 --- a/tests/manual/debugger/simple/simple_test_app.cpp +++ b/tests/manual/debugger/simple/simple_test_app.cpp @@ -6106,14 +6106,16 @@ namespace qjson { }; QJsonArray arr; for (unsigned int i = 0; i < 32; ++i) { - arr.append(QJsonValue(qint64(quint64(1) << i) - 1)); - arr.append(QJsonValue(qint64(quint64(1) << i))); - arr.append(QJsonValue(qint64(quint64(1) << i) + 1)); + const qint64 bit = 1ll << i; + arr.append(QJsonValue(bit - 1)); + arr.append(QJsonValue(bit)); + arr.append(QJsonValue(bit + 1)); } for (unsigned int i = 0; i < 32; ++i) { - arr.append(QJsonValue(-qint64(quint64(1) << i) + 1)); - arr.append(QJsonValue(-qint64(quint64(1) << i))); - arr.append(QJsonValue(-qint64(quint64(1) << i) - 1)); + const qint64 bit = -(1ll << i); + arr.append(QJsonValue(bit + 1)); + arr.append(QJsonValue(bit)); + arr.append(QJsonValue(bit - 1)); } BREAK_HERE; // Check v -1 QJsonValue. |