Ykkrosh
a1a7dac59c
ObjectManager: Removed ObjectTypes because it hasn't been used for years. Atlas: Fixed leak when saving with Xerces. Changed range of water shininess slider. Actor Editor: Relabelled "Freq" to "Ratio". Made modal dialogs use the correct parent. This was SVN commit r4376.
23 lines
592 B
C++
23 lines
592 B
C++
#include "stdafx.h"
|
|
|
|
#include "Observable.h"
|
|
|
|
void ObservableScopedConnections::Add(const ObservableConnection& conn)
|
|
{
|
|
// Clean up any disconnected connections that might be left in here
|
|
m_Conns.erase(
|
|
remove_if(m_Conns.begin(), m_Conns.end(),
|
|
not1(std::mem_fun_ref(&ObservableConnection::connected))),
|
|
m_Conns.end()
|
|
);
|
|
|
|
// Add the new connection
|
|
m_Conns.push_back(conn);
|
|
}
|
|
|
|
ObservableScopedConnections::~ObservableScopedConnections()
|
|
{
|
|
// Disconnect all connections that we hold
|
|
for_each(m_Conns.begin(), m_Conns.end(), std::mem_fun_ref(&ObservableConnection::disconnect));
|
|
}
|