about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2016-08-09 16:00:26 -0700
committerKartik K. Agaram <vc@akkartik.com>2016-08-09 16:04:02 -0700
commit4d646564692eee2d521d1654a50f68114d3ab825 (patch)
treed12128c5bea7f82d745d16bb9538a254e0254211
parent8d7b228ea5883b1cf83e3352fbe929a30b8d0f24 (diff)
downloadmu-4d646564692eee2d521d1654a50f68114d3ab825.tar.gz
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.
-rw-r--r--050scenario.cc5
1 files changed, 0 insertions, 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<scenario> Scenarios;
-set<string> 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);