Skip to content

Commit

Permalink
Remember forgotten include file.
Browse files Browse the repository at this point in the history
  • Loading branch information
tturocy committed Oct 16, 2024
1 parent 4e6c108 commit 272fc20
Showing 1 changed file with 2 additions and 15 deletions.
17 changes: 2 additions & 15 deletions src/games/file.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include <iostream>
#include <fstream>
#include <map>
#include <algorithm>

#include "gambit.h"
// for explicit access to turning off canonicalization
Expand Down Expand Up @@ -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");
Expand All @@ -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;
}
Expand Down Expand Up @@ -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");
Expand Down

0 comments on commit 272fc20

Please sign in to comment.