From 2219a03344c8266fcb25f4b24b6bb8957b35f589 Mon Sep 17 00:00:00 2001 From: Jon Siwek Date: Sun, 13 Dec 2020 13:27:05 -0800 Subject: [PATCH] Rename Frame::IncreaseOffset() to Frame::AdjustOffset() For clarity, since it's used for both increasing and decreasing. --- src/Frame.h | 4 ++-- src/script_opt/Expr.cc | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Frame.h b/src/Frame.h index c894655f8b..16299ddca2 100644 --- a/src/Frame.h +++ b/src/Frame.h @@ -99,13 +99,13 @@ public: { return GetElementByID(id).get(); } /** - * Increases the current offset being used for frame accesses. + * Adjusts the current offset being used for frame accesses. * This is in support of inlined functions. * * @param incr Amount by which to increase the frame offset. * Use a negative value to shrink the offset. */ - void IncreaseOffset(int incr) { current_offset += incr; } + void AdjustOffset(int incr) { current_offset += incr; } /** * Resets all of the indexes from [*startIdx, frame_size) in diff --git a/src/script_opt/Expr.cc b/src/script_opt/Expr.cc index 714a765d41..dac129eb4e 100644 --- a/src/script_opt/Expr.cc +++ b/src/script_opt/Expr.cc @@ -479,7 +479,7 @@ ValPtr InlineExpr::Eval(Frame* f) const int nargs = args->Exprs().length(); f->Reset(frame_offset + nargs); - f->IncreaseOffset(frame_offset); + f->AdjustOffset(frame_offset); // Assign the arguments. for ( auto i = 0; i < nargs; ++i ) @@ -494,11 +494,11 @@ ValPtr InlineExpr::Eval(Frame* f) const catch ( InterpreterException& e ) { - f->IncreaseOffset(-frame_offset); + f->AdjustOffset(-frame_offset); throw; } - f->IncreaseOffset(-frame_offset); + f->AdjustOffset(-frame_offset); return result; }