From 4d646564692eee2d521d1654a50f68114d3ab825 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Tue, 9 Aug 2016 16:00:26 -0700 Subject: 3161 Toss out Scenario_names. It's only checking if we load duplicate scenarios, and we have independent checks for *running* duplicate scenarios. This has the salubrious effect of also allowing lessons to contain regular text scenarios interspersed with their recipes. --- 050scenario.cc | 5 ----- 1 file changed, 5 deletions(-) diff --git a/050scenario.cc b/050scenario.cc index 28ef58e7..b9f3099a 100644 --- a/050scenario.cc +++ b/050scenario.cc @@ -62,7 +62,6 @@ struct scenario { :(before "End Globals") vector Scenarios; -set Scenario_names; //:: Parse the 'scenario' form. //: Simply store the text of the scenario. @@ -76,9 +75,6 @@ else if (command == "scenario") { scenario parse_scenario(istream& in) { scenario result; result.name = next_word(in); - if (contains_key(Scenario_names, result.name)) - raise << "duplicate scenario name: '" << result.name << "'\n" << end(); - Scenario_names.insert(result.name); skip_whitespace_and_comments(in); if (in.peek() != '[') { raise << "Expected '[' after scenario '" << result.name << "'\n" << end(); @@ -752,7 +748,6 @@ void mark_autogenerated(recipe_ordinal r) { :(code) // just for the scenarios running scenarios in C++ layers void run_mu_scenario(const string& form) { - Scenario_names.clear(); istringstream in(form); in >> std::noskipws; skip_whitespace_and_comments(in); -- cgit 1.4.1-2-gfad0