Codebase list dds / df5832c
Fix signedness problems with char variables. Christoph Berg 5 years ago
3 changed file(s) with 31 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 dds (2.9.0-3) unstable; urgency=medium
1
2 * Fix signedness problems with char variables.
3
4 -- Christoph Berg <christoph.berg@credativ.de> Mon, 24 Sep 2018 14:01:43 +0200
5
06 dds (2.9.0-2) unstable; urgency=medium
17
28 * Depend on procps, uses "free" at run-time.
0 --- a/src/Init.cpp
1 +++ b/src/Init.cpp
2 @@ -531,7 +531,7 @@ void SetDealTables(
3 for (int s = 0; s < DDS_SUITS; s++)
4 {
5 relp->absRank[1][s].hand =
6 - static_cast<char>(handLookup[s][topBitNo]);
7 + static_cast<signed char>(handLookup[s][topBitNo]);
8 relp->absRank[1][s].rank = static_cast<char>(topBitNo);
9 }
10 }
11 --- a/src/TransTableL.cpp
12 +++ b/src/TransTableL.cpp
13 @@ -1025,8 +1025,8 @@ void TransTableL::PrintNodeValues(
14 cardSuit[3] << cardRank[15-static_cast<int>(np.leastWin[3])] << "\n";
15
16 fout << setw(16) << left << "Bounds" <<
17 - to_string(np.lbound) << " to " <<
18 - to_string(np.ubound) << " tricks\n";
19 + to_string(static_cast<int>(np.lbound)) << " to " <<
20 + to_string(static_cast<int>(np.ubound)) << " tricks\n";
21
22 fout << setw(16) << left << "Best move" <<
23 cardSuit[ static_cast<int>(np.bestMoveSuit) ] <<
00 cflags
11 no-mgeneric
22 bool
3 char