diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2016-08-29 14:58:16 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2016-08-29 14:58:16 -0700 |
commit | d41955c10821fc8f435173efe8cd355cc3693801 (patch) | |
tree | 7deaf70df200b97df0c46e65cc6f2e23495d0997 /020run.cc | |
parent | ceb33ee40f2c210c02d59469f7146cefdb4b6fba (diff) | |
download | mu-d41955c10821fc8f435173efe8cd355cc3693801.tar.gz |
3279
Stop inlining functions because that will complicate separate compilation. It also simplifies the code without impacting performance.
Diffstat (limited to '020run.cc')
-rw-r--r-- | 020run.cc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/020run.cc b/020run.cc index e5bde518..51944784 100644 --- a/020run.cc +++ b/020run.cc @@ -111,23 +111,23 @@ bool should_copy_ingredients() { //: We'll need to override these later as we change the definition of routine. //: Important that they return referrences into the routine. -inline int& current_step_index() { +int& current_step_index() { return Current_routine->running_step_index; } -inline const string& current_recipe_name() { +const string& current_recipe_name() { return get(Recipe, Current_routine->running_recipe).name; } -inline const instruction& current_instruction() { +const instruction& current_instruction() { return get(Recipe, Current_routine->running_recipe).steps.at(Current_routine->running_step_index); } -inline bool routine::completed() const { +bool routine::completed() const { return running_step_index >= SIZE(get(Recipe, running_recipe).steps); } -inline const vector<instruction>& routine::steps() const { +const vector<instruction>& routine::steps() const { return get(Recipe, running_recipe).steps; } @@ -325,17 +325,17 @@ bool size_mismatch(const reagent& x, const vector<double>& data) { return size_of(x) != SIZE(data); } -inline bool is_literal(const reagent& r) { +bool is_literal(const reagent& r) { if (!r.type) return false; if (r.type->value == 0) assert(!r.type->left && !r.type->right); return r.type->value == 0; } -inline bool scalar(const vector<int>& x) { +bool scalar(const vector<int>& x) { return SIZE(x) == 1; } -inline bool scalar(const vector<double>& x) { +bool scalar(const vector<double>& x) { return SIZE(x) == 1; } |