Skip to content

Commit

Permalink
JunctionBoxEntry shouldn't have TypeUnifier internally
Browse files Browse the repository at this point in the history
  • Loading branch information
gtremper committed Aug 1, 2014
1 parent c1c7603 commit 0c76af8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
3 changes: 2 additions & 1 deletion autowiring/CoreContext.h
Original file line number Diff line number Diff line change
Expand Up @@ -673,11 +673,12 @@ class CoreContext:
template<typename MemFn>
InvokeRelay<MemFn> Invoke(MemFn memFn){
typedef typename Decompose<MemFn>::type EventType;
typedef typename SelectTypeUnifier<EventType>::type UnifiedType;

if (!std::is_same<AutowiringEvents,EventType>::value)
GetGlobal()->Invoke(&AutowiringEvents::EventFired)(*this, typeid(EventType));

return MakeInvokeRelay(GetJunctionBox<EventType>(), memFn);
return MakeInvokeRelay(GetJunctionBox<UnifiedType>(), memFn);
}

/// <summary>
Expand Down
6 changes: 2 additions & 4 deletions autowiring/JunctionBoxEntry.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,12 @@ template<class T>
struct JunctionBoxEntry:
JunctionBoxEntryBase
{
typedef typename SelectTypeUnifier<T>::type EntryType_t;

JunctionBoxEntry(CoreContext* owner, std::shared_ptr<T> ptr) :
JunctionBoxEntryBase(owner),
m_ptr(autowiring::fast_pointer_cast<EntryType_t>(ptr))
m_ptr(ptr)
{}

std::shared_ptr<EntryType_t> m_ptr;
std::shared_ptr<T> m_ptr;

JunctionBoxEntry& operator=(const JunctionBoxEntry& rhs) {
// This shouldn't be used. non-c++11 containers require this...
Expand Down

0 comments on commit 0c76af8

Please sign in to comment.