diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-09-01 20:28:17 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-09-01 20:28:17 -0700 |
commit | deba749420c2b45e8db64524aa76d547d0462f09 (patch) | |
tree | 4a82423ba84e6805a1e06c465fd590d22c19388a | |
parent | b291d6f929951f989c269bb78cb66a79dadf924f (diff) | |
download | mu-deba749420c2b45e8db64524aa76d547d0462f09.tar.gz |
2125 - bugfix for containers in the environment
We don't want to add duplicate fields to the container everytime we hit F4.
-rw-r--r-- | 081run_interactive.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/081run_interactive.cc b/081run_interactive.cc index 9c5350e7..6bd74e47 100644 --- a/081run_interactive.cc +++ b/081run_interactive.cc @@ -338,6 +338,11 @@ case RELOAD: { } Hide_warnings = true; Disable_redefine_warnings = true; + // clear any containers in advance + for (long long int i = 0; i < SIZE(recently_added_types); ++i) { + Type_ordinal.erase(Type[recently_added_types.at(i)].name); + Type.erase(recently_added_types.at(i)); + } string code = read_mu_string(ingredients.at(0).at(0)); vector<recipe_ordinal> recipes_reloaded = load(code); for (long long int i = 0; i < SIZE(recipes_reloaded); ++i) { |