@@ -105,15 +105,16 @@ Rational NashSimpdivStrategySolver::Simplex(MixedStrategyProfile<Rational> &y,
105105 v.SetFlattened (y.GetProbVector ());
106106 besty.SetFlattened (y.GetProbVector ());
107107 int i = 0 ;
108- int j, k, h, jj, hh, ii, kk, tot;
108+ int jj, ii;
109+ size_t j, h, hh, tot, k, kk;
109110 Rational maxz;
110111
111112 // Label step0 not currently used, hence commented
112113 // step0:
113114 TT = 0 ;
114115 U = 0 ;
115116 ab = Rational (0 );
116- for (j = 1 ; j <= static_cast < int >( game->NumPlayers () ); j++) {
117+ for (j = 1 ; j <= game->NumPlayers (); j++) {
117118 const GamePlayer player = game->GetPlayer (j);
118119 for (h = 1 ; h <= nstrats[j]; h++) {
119120 if (v.segment (j)[h] == Rational (0 )) {
@@ -149,7 +150,8 @@ Rational NashSimpdivStrategySolver::Simplex(MixedStrategyProfile<Rational> &y,
149150 /* case1b */
150151 else if (TT.segment (j)[h]) {
151152 i = 1 ;
152- while (labels (i, 1 ) != j || labels (i, 2 ) != h || i == state.ibar ) {
153+ while (labels (i, 1 ) != static_cast <int >(j) || labels (i, 2 ) != static_cast <int >(h) ||
154+ i == state.ibar ) {
153155 i++;
154156 }
155157 goto step3;
@@ -168,7 +170,8 @@ Rational NashSimpdivStrategySolver::Simplex(MixedStrategyProfile<Rational> &y,
168170 }
169171 else {
170172 i = 1 ;
171- while ((pi (i, 1 ) != j || pi (i, 2 ) != k) && i <= state.t ) {
173+ while ((pi (i, 1 ) != static_cast <int >(j) || pi (i, 2 ) != static_cast <int >(k)) &&
174+ i <= state.t ) {
172175 i++;
173176 }
174177 }
@@ -293,7 +296,7 @@ Rational NashSimpdivStrategySolver::Simplex(MixedStrategyProfile<Rational> &y,
293296 pi.RotateUp (i - 1 , state.t );
294297 state.t --;
295298 ii = 1 ;
296- while (labels (ii, 1 ) != j || labels (ii, 2 ) != h ) {
299+ while (labels (ii, 1 ) != static_cast < int >(j) || labels (ii, 2 ) != static_cast < int >(h) ) {
297300 ii++;
298301 }
299302 i = ii;
@@ -339,7 +342,8 @@ void NashSimpdivStrategySolver::update(State &state, RectArray<int> &pi, RectArr
339342 SegmentedVector<Rational> &ab,
340343 const SegmentedVector<int > &U, int j, int i)
341344{
342- int jj, hh, k, f = 1 ;
345+ int jj, f = 1 ;
346+ size_t k, hh;
343347
344348 if (i >= 2 && i <= state.t ) {
345349 pi.SwitchRows (i, i - 1 );
0 commit comments