From 60eede6a1dfa186fec2802b5171f1505b2975b51 Mon Sep 17 00:00:00 2001 From: elsid Date: Tue, 10 Jan 2023 04:42:46 +0100 Subject: [PATCH] Fix variable naming styleguide --- components/interpreter/runtime.cpp | 6 +++--- components/interpreter/runtime.hpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/components/interpreter/runtime.cpp b/components/interpreter/runtime.cpp index f82b0fb3d6..aa123e443e 100644 --- a/components/interpreter/runtime.cpp +++ b/components/interpreter/runtime.cpp @@ -90,12 +90,12 @@ namespace Interpreter mStack.pop_back(); } - Data& Runtime::operator[](int Index) + Data& Runtime::operator[](int index) { - if (Index < 0 || Index >= static_cast(mStack.size())) + if (index < 0 || index >= static_cast(mStack.size())) throw std::runtime_error("stack index out of range"); - return mStack[mStack.size() - Index - 1]; + return mStack[mStack.size() - index - 1]; } Context& Runtime::getContext() diff --git a/components/interpreter/runtime.hpp b/components/interpreter/runtime.hpp index 77c65d4d67..33cfe286ae 100644 --- a/components/interpreter/runtime.hpp +++ b/components/interpreter/runtime.hpp @@ -51,7 +51,7 @@ namespace Interpreter void pop(); ///< pop stack - Data& operator[](int Index); + Data& operator[](int index); ///< Access stack member, counted from the top. Context& getContext();