Skip to content
This repository was archived by the owner on Oct 8, 2025. It is now read-only.

Commit 576721c

Browse files
authored
Merge pull request #9 from Sreyas-Sreelal/fix_event_call_flow
fix issue in event call logic
2 parents f72602e + 8005445 commit 576721c

File tree

1 file changed

+6
-26
lines changed

1 file changed

+6
-26
lines changed

src/Impl/ComponentManager.hpp

Lines changed: 6 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -97,51 +97,31 @@ class ComponentManager : public Singleton<ComponentManager>
9797
auto low_ = fairlyLowPriorityEvents.find(name);
9898
auto lowest_ = lowestPriorityEvents.find(name);
9999

100-
bool result = returnHandler != EventReturnHandler::StopAtTrue;
100+
bool result;
101101

102102
if (highest_ != highestPriorityEvents.end())
103103
{
104-
auto ret = CallEventOfPriority(highest_, returnHandler, args...);
105-
if (!ret)
106-
{
107-
result = false;
108-
}
104+
result = CallEventOfPriority(highest_, returnHandler, args...);
109105
}
110106

111107
if (high_ != fairlyHighPriorityEvents.end())
112108
{
113-
auto ret = CallEventOfPriority(high_, returnHandler, args...);
114-
if (!ret)
115-
{
116-
result = false;
117-
}
109+
result = CallEventOfPriority(high_, returnHandler, args...);
118110
}
119111

120112
if (default_ != defaultPriorityEvents.end())
121113
{
122-
auto ret = CallEventOfPriority(default_, returnHandler, args...);
123-
if (!ret)
124-
{
125-
result = false;
126-
}
114+
result = CallEventOfPriority(default_, returnHandler, args...);
127115
}
128116

129117
if (low_ != fairlyLowPriorityEvents.end())
130118
{
131-
auto ret = CallEventOfPriority(low_, returnHandler, args...);
132-
if (!ret)
133-
{
134-
result = false;
135-
}
119+
result = CallEventOfPriority(low_, returnHandler, args...);
136120
}
137121

138122
if (lowest_ != lowestPriorityEvents.end())
139123
{
140-
auto ret = CallEventOfPriority(lowest_, returnHandler, args...);
141-
if (!ret)
142-
{
143-
result = false;
144-
}
124+
result = CallEventOfPriority(lowest_, returnHandler, args...);
145125
}
146126

147127
return result;

0 commit comments

Comments
 (0)