diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-10-28 06:27:01 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-10-28 06:27:01 -0700 |
commit | 67573caf07392a89df841ef47cc98e5b91a13205 (patch) | |
tree | 82698363791699f96fbfb6fd6a9e9749996476f4 /034call.cc | |
parent | 5810092d53f44e639c7bfd4e62d1960c323dcb6f (diff) | |
download | mu-67573caf07392a89df841ef47cc98e5b91a13205.tar.gz |
2297
Diffstat (limited to '034call.cc')
-rw-r--r-- | 034call.cc | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/034call.cc b/034call.cc index 87d0d601..f33e6053 100644 --- a/034call.cc +++ b/034call.cc @@ -64,22 +64,27 @@ routine::routine(recipe_ordinal r) { // End routine Constructor } +:(code) +inline call& current_call() { + return Current_routine->calls.front(); +} + //:: now update routine's helpers :(replace{} "inline long long int& current_step_index()") inline long long int& current_step_index() { assert(!Current_routine->calls.empty()); - return Current_routine->calls.front().running_step_index; + return current_call().running_step_index; } :(replace{} "inline const string& current_recipe_name()") inline const string& current_recipe_name() { assert(!Current_routine->calls.empty()); - return Recipe[Current_routine->calls.front().running_recipe].name; + return Recipe[current_call().running_recipe].name; } :(replace{} "inline const instruction& current_instruction()") inline const instruction& current_instruction() { assert(!Current_routine->calls.empty()); - return Recipe[Current_routine->calls.front().running_recipe].steps.at(Current_routine->calls.front().running_step_index); + return Recipe[current_call().running_recipe].steps.at(current_call().running_step_index); } :(after "Defined Recipe Checks") |