diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-05-04 11:02:56 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-05-04 11:02:56 -0700 |
commit | a66c9ae68122e04637d65c7f3aedcd96012c8cb6 (patch) | |
tree | ceddf9f22c55621be86768a0aeedc927495e62d6 /cpp/035call.cc | |
parent | de49fb426aa44984d308f5856ec836360ba0bdce (diff) | |
download | mu-a66c9ae68122e04637d65c7f3aedcd96012c8cb6.tar.gz |
1249 - new type: index_t
It will always be identical to size_t, just more readable, like recipe_number, etc. The various unsigned types are sizes, indices (which often compare with sizes for bounds checking), numbers which are canonical elements of a specific space (like recipes or mu types), and ids which I haven't introduced yet.
Diffstat (limited to 'cpp/035call.cc')
-rw-r--r-- | cpp/035call.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cpp/035call.cc b/cpp/035call.cc index 75c617a6..2cb40af8 100644 --- a/cpp/035call.cc +++ b/cpp/035call.cc @@ -33,7 +33,7 @@ recipe f [ // This requires maintaining a 'stack' of interrupted recipes or 'calls'. struct call { recipe_number running_recipe; - size_t running_step_index; + index_t running_step_index; // End call Fields call(recipe_number r) :running_recipe(r), running_step_index(0) {} }; @@ -55,8 +55,8 @@ routine::routine(recipe_number r) { //:: now update routine's helpers -:(replace{} "inline size_t& current_step_index()") -inline size_t& current_step_index() { +:(replace{} "inline index_t& current_step_index()") +inline index_t& current_step_index() { return Current_routine->calls.top().running_step_index; } :(replace{} "inline const string& current_recipe_name()") |