diff --git a/src/games/file.cc b/src/games/file.cc index 65885637a..149c00344 100644 --- a/src/games/file.cc +++ b/src/games/file.cc @@ -25,6 +25,7 @@ #include #include #include +#include #include "gambit.h" // for explicit access to turning off canonicalization @@ -482,14 +483,6 @@ void ReadPlayers(GameFileLexer &p_state, Game &p_game, TreeData &p_treeData) p_state.ExpectCurrentToken(TOKEN_RBRACE, "'}'"); } -// -// Precondition: Parser state should be expecting the integer index -// of the outcome in a node entry -// -// Postcondition: Parser state is past the outcome entry and should be -// pointing to the 'c', 'p', or 't' token starting the -// next node declaration. -// void ParseOutcome(GameFileLexer &p_state, Game &p_game, TreeData &p_treeData, GameNode &p_node) { p_state.ExpectCurrentToken(TOKEN_NUMBER, "index of outcome"); @@ -502,7 +495,7 @@ void ParseOutcome(GameFileLexer &p_state, Game &p_game, TreeData &p_treeData, Ga try { outcome = p_treeData.m_outcomeMap.at(outcomeId); } - catch (std::out_of_range) { + catch (std::out_of_range &) { outcome = p_game->NewOutcome(); p_treeData.m_outcomeMap[outcomeId] = outcome; } @@ -533,12 +526,6 @@ void ParseOutcome(GameFileLexer &p_state, Game &p_game, TreeData &p_treeData, Ga void ParseNode(GameFileLexer &p_state, Game p_game, GameNode p_node, TreeData &p_treeData); -// -// Precondition: parser state is expecting the node label -// -// Postcondition: parser state is pointing at the 'c', 'p', or 't' -// beginning the next node entry -// void ParseChanceNode(GameFileLexer &p_state, Game &p_game, GameNode &p_node, TreeData &p_treeData) { p_state.ExpectNextToken(TOKEN_TEXT, "node label");