remove num_actions
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
@@ -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();
|
||||
|
Reference in New Issue
Block a user