From d11e50f5b5aa20d6ee6f8edfb29e56ec7739d971 Mon Sep 17 00:00:00 2001 From: Daniel Kolesa Date: Sun, 28 Mar 2021 01:33:31 +0100 Subject: [PATCH] remove the now useless MAX_RESULTS constant --- src/cs_gen.hh | 1 - src/cs_thread.cc | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/cs_gen.hh b/src/cs_gen.hh index bdab611..0083697 100644 --- a/src/cs_gen.hh +++ b/src/cs_gen.hh @@ -16,7 +16,6 @@ namespace cubescript { static constexpr int MAX_ARGUMENTS = 25; -static constexpr int MAX_RESULTS = 7; static constexpr int ID_IDX_DUMMY = MAX_ARGUMENTS; static constexpr int ID_IDX_NUMARGS = MAX_ARGUMENTS + 1; diff --git a/src/cs_thread.cc b/src/cs_thread.cc index 2c3265e..35485f1 100644 --- a/src/cs_thread.cc +++ b/src/cs_thread.cc @@ -7,7 +7,7 @@ namespace cubescript { thread_state::thread_state(internal_state *cs): vmstack{cs}, errbuf{cs} { - vmstack.reserve(MAX_ARGUMENTS + MAX_RESULTS); + vmstack.reserve(32); } hook_func thread_state::set_hook(hook_func f) { @@ -16,4 +16,4 @@ hook_func thread_state::set_hook(hook_func f) { return hk; } -} /* namespace cubescript */ \ No newline at end of file +} /* namespace cubescript */