Skip to content

Commit 107eeaa

Browse files
committed
Merge branch 'maint16_3'
2 parents a65784d + b5897f9 commit 107eeaa

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/games/game.cc

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -449,10 +449,8 @@ template <class T> Vector<T> MixedStrategyProfile<T>::operator[](const GamePlaye
449449
CheckVersion();
450450
auto strategies = m_rep->m_support.GetStrategies(p_player);
451451
Vector<T> probs(strategies.size());
452-
int st = 1;
453-
for (auto strategy : strategies) {
454-
probs[st] = (*this)[strategy];
455-
}
452+
std::transform(strategies.begin(), strategies.end(), probs.begin(),
453+
[this](const GameStrategy &s) { return (*m_rep)[s]; });
456454
return probs;
457455
}
458456

0 commit comments

Comments
 (0)