Core/Signal: Optimize
Former-commit-id: 36fee5057acabf1b6bb8ef93ad6741206e10121b
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
#include <list>
|
||||
#include <vector>
|
||||
|
||||
template<typename... Args>
|
||||
class NzSignal
|
||||
@@ -40,7 +40,7 @@ class NzSignal
|
||||
struct Slot;
|
||||
|
||||
using SlotPtr = std::shared_ptr<Slot>;
|
||||
using SlotList = std::list<SlotPtr>;
|
||||
using SlotList = std::vector<SlotPtr>;
|
||||
|
||||
struct Slot
|
||||
{
|
||||
@@ -51,7 +51,7 @@ class NzSignal
|
||||
|
||||
Callback callback;
|
||||
NzSignal* signal;
|
||||
typename SlotList::iterator it;
|
||||
typename SlotList::size_type index;
|
||||
};
|
||||
|
||||
void Disconnect(const SlotPtr& slot);
|
||||
|
||||
Reference in New Issue
Block a user