- Use a NotifyLock instead of (History|Simulation)::set_notify_enabled() method, which is more elegant and also exception-safe
- Delete set_notify_enabled() method from ConcreteHistory; it was both wrong and useless, and caused impredictable behaviour! - Don't make some methods of History and Simulation virtual if we don't want the user to override them - Loading from file and jumping to an instant of the simulation should be much quickier now git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@1170 3ecf2c5c-341e-0410-92b4-d18e462d057c
This commit is contained in:
parent
737324f250
commit
83b655496f
11 changed files with 94 additions and 73 deletions
|
@ -523,14 +523,6 @@ ConcreteHistory::reset(bool notify)
|
|||
notify_change();
|
||||
}
|
||||
|
||||
void
|
||||
ConcreteHistory::notify_change()
|
||||
{
|
||||
History::RegisteredObservers::iterator it;
|
||||
for (it = _observers.begin(); it != _observers.end(); it++)
|
||||
(*it)->update(*this);
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
ConcreteHistory::is_sealed() const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue