From d450c114784c26f1ebcc18c0d63d6117819b1273 Mon Sep 17 00:00:00 2001 From: blueloveTH Date: Mon, 5 Dec 2022 17:53:08 +0800 Subject: [PATCH] Update safestl.h --- src/safestl.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/safestl.h b/src/safestl.h index 4bdf70ed..5e11f819 100644 --- a/src/safestl.h +++ b/src/safestl.h @@ -57,8 +57,8 @@ public: namespace pkpy { - const uint8_t MAX_POOLING_N = 16; - static std::deque* _poolArgList = new std::deque[MAX_POOLING_N]; + const uint8_t MAX_POOLING_N = 10; + static std::vector* _poolArgList = new std::vector[MAX_POOLING_N]; class ArgList { PyVar* _args = nullptr; @@ -77,9 +77,9 @@ namespace pkpy { this->_size = n; this->_args = new PyVar[n]; }else{ - this->_args = _poolArgList[n].front(); + this->_args = _poolArgList[n].back(); this->_size = n; - _poolArgList[n].pop_front(); + _poolArgList[n].pop_back(); } }