From 90560d7194f3e451ddab9d4033c98d2e6aec977b Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Sun, 23 Aug 2015 10:19:23 -0700 Subject: 2062 --- html/012transform.cc.html | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) (limited to 'html/012transform.cc.html') diff --git a/html/012transform.cc.html b/html/012transform.cc.html index 21163e04..acd35f6c 100644 --- a/html/012transform.cc.html +++ b/html/012transform.cc.html @@ -13,12 +13,11 @@ pre { white-space: pre-wrap; font-family: monospace; color: #eeeeee; background-color: #080808; } body { font-family: monospace; color: #eeeeee; background-color: #080808; } * { font-size: 1.05em; } +.Identifier { color: #804000; } .Constant { color: #00a0a0; } -.Normal { color: #eeeeee; background-color: #080808; padding-bottom: 1px; } .Comment { color: #9090ff; } .Delimiter { color: #a04060; } .CommentedCode { color: #6c6c6c; } -.Identifier { color: #804000; } --> @@ -36,23 +35,23 @@ body { font-family: monospace; color: #eeeeee; background-color: #080808; } //: deconstructed alternative to conventional compilers. :(before "End recipe Fields") -long long int transformed_until; +long long int transformed_until; recipe() :transformed_until(-1) {} :(before "End Types") -typedef void (*transform_fn)(recipe_ordinal); +typedef void (*transform_fn)(recipe_ordinal); :(before "End Globals") vector<transform_fn> Transform; :(code) -void transform_all() { +void transform_all() { //? cerr << "AAA transform_all\n"; //? 2 - for (long long int t = 0; t < SIZE(Transform); ++t) { - for (map<recipe_ordinal, recipe>::iterator p = Recipe.begin(); p != Recipe.end(); ++p) { + for (long long int t = 0; t < SIZE(Transform); ++t) { + for (map<recipe_ordinal, recipe>::iterator p = Recipe.begin(); p != Recipe.end(); ++p) { recipe& r = p->second; - if (r.steps.empty()) continue; - if (r.transformed_until != t-1) continue; + if (r.steps.empty()) continue; + if (r.transformed_until != t-1) continue; (*Transform.at(t))(/*recipe_ordinal*/p->first); r.transformed_until = t; } @@ -60,27 +59,27 @@ vector<transform_fn> Transform; parse_int_reagents(); // do this after all other transforms have run } -void parse_int_reagents() { +void parse_int_reagents() { //? cout << "parse_int_reagents\n"; //? 1 - for (map<recipe_ordinal, recipe>::iterator p = Recipe.begin(); p != Recipe.end(); ++p) { + for (map<recipe_ordinal, recipe>::iterator p = Recipe.begin(); p != Recipe.end(); ++p) { recipe& r = p->second; - if (r.steps.empty()) continue; - for (long long int index = 0; index < SIZE(r.steps); ++index) { + if (r.steps.empty()) continue; + for (long long int index = 0; index < SIZE(r.steps); ++index) { instruction& inst = r.steps.at(index); - for (long long int i = 0; i < SIZE(inst.ingredients); ++i) { + for (long long int i = 0; i < SIZE(inst.ingredients); ++i) { populate_value(inst.ingredients.at(i)); } - for (long long int i = 0; i < SIZE(inst.products); ++i) { + for (long long int i = 0; i < SIZE(inst.products); ++i) { populate_value(inst.products.at(i)); } } } } -void populate_value(reagent& r) { - if (r.initialized) return; +void populate_value(reagent& r) { + if (r.initialized) return; // End Reagent-parsing Exceptions - if (!is_integer(r.name)) return; + if (!is_integer(r.name)) return; r.set_value(to_integer(r.name)); } -- cgit 1.4.1-2-gfad0