remove num_actions

This commit is contained in:
2025-06-02 14:21:37 -05:00
parent 40671daa85
commit 862fff6c2f
2 changed files with 1 additions and 4 deletions

View File

@@ -87,10 +87,8 @@ void cUndoList::add(action_ptr what){
UNDO_LOG("Performing " + what->getActionName());
theList.erase(theList.begin(), cur);
theList.push_front(what);
num_actions++;
while(num_actions > maxUndoSize) {
while(theList.size() > maxUndoSize) {
theList.pop_back();
num_actions--;
}
cur = theList.begin();
}

View File

@@ -56,7 +56,6 @@ using action_ptr = std::shared_ptr<cAction>;
class cUndoList {
std::list<action_ptr> theList;
std::list<action_ptr>::iterator cur, lastSave;
size_t num_actions = 0;
public:
/// Construct a new undo list.
cUndoList();