From 52df3a2f67159605f1d1ad6de79b372481ed4fae Mon Sep 17 00:00:00 2001 From: blueloveTH Date: Mon, 20 Feb 2023 09:07:24 +0800 Subject: [PATCH] Revert "Update safestl.h" This reverts commit 66cf67668c58c6127fbd296d477fb916ace1d92f. --- src/safestl.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/safestl.h b/src/safestl.h index 6049d059..34784bd4 100644 --- a/src/safestl.h +++ b/src/safestl.h @@ -51,13 +51,10 @@ namespace pkpy { this->_size = 0; return; } - if(n >= kMaxPoolSize){ + if(n >= kMaxPoolSize || _args_pool[n].empty()){ this->_args = new PyVar[n]; this->_size = n; }else{ - if(_args_pool[n].empty()){ - for(int i=0; i<8; i++) _args_pool[n].push_back(new PyVar[n]); - } this->_args = _args_pool[n].back(); this->_size = n; _args_pool[n].pop_back();