Skip to content

Commit 90057e3

Browse files
committed
Cleanup.
1 parent 76be2a9 commit 90057e3

2 files changed

Lines changed: 13 additions & 19 deletions

File tree

‎include/react/detail/event_nodes.h‎

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,6 @@ template <typename E>
4545
class EventNode : public NodeBase
4646
{
4747
public:
48-
EventNode(EventNode&&) = default;
49-
EventNode& operator=(EventNode&&) = default;
50-
51-
EventNode(const EventNode&) = delete;
52-
EventNode& operator=(const EventNode&) = delete;
53-
5448
explicit EventNode(const Group& group) :
5549
EventNode::NodeBase( group )
5650
{ }
@@ -161,7 +155,7 @@ class EventSlotNode : public EventNode<E>
161155

162156
~EventSlotNode()
163157
{
164-
RemoveAllInputs();
158+
RemoveAllSlotInputs();
165159
this->DetachFromMe(inputNodeId_);
166160

167161
this->UnregisterMe();
@@ -182,7 +176,7 @@ class EventSlotNode : public EventNode<E>
182176
return UpdateResult::unchanged;
183177
}
184178

185-
void AddInput(const Event<E>& input)
179+
void AddSlotInput(const Event<E>& input)
186180
{
187181
auto it = std::find(inputs_.begin(), inputs_.end(), input);
188182
if (it == inputs_.end())
@@ -192,7 +186,7 @@ class EventSlotNode : public EventNode<E>
192186
}
193187
}
194188

195-
void RemoveInput(const Event<E>& input)
189+
void RemoveSlotInput(const Event<E>& input)
196190
{
197191
auto it = std::find(inputs_.begin(), inputs_.end(), input);
198192
if (it != inputs_.end())
@@ -202,7 +196,7 @@ class EventSlotNode : public EventNode<E>
202196
}
203197
}
204198

205-
void RemoveAllInputs()
199+
void RemoveAllSlotInputs()
206200
{
207201
for (const auto& e : inputs_)
208202
this->DetachFromMe(GetInternals(e).GetNodeId());

‎include/react/event.h‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -192,13 +192,13 @@ class EventSlot : public Event<E>
192192
EventSlot& operator=(EventSlot&&) = default;
193193

194194
void Add(const Event<E>& input)
195-
{ AddInput(input); }
195+
{ AddSlotInput(input); }
196196

197197
void Remove(const Event<E>& input)
198-
{ RemoveInput(input); }
198+
{ RemoveSlotInput(input); }
199199

200200
void RemoveAll()
201-
{ RemoveAllInputs(); }
201+
{ RemoveAllSlotInputs(); }
202202

203203
protected:
204204
EventSlot(std::shared_ptr<REACT_IMPL::EventNode<E>>&& nodePtr) :
@@ -212,7 +212,7 @@ class EventSlot : public Event<E>
212212
return std::make_shared<EventSlotNode<E>>(group);
213213
}
214214

215-
void AddInput(const Event<E>& input)
215+
void AddSlotInput(const Event<E>& input)
216216
{
217217
using REACT_IMPL::NodeId;
218218
using SlotNodeType = REACT_IMPL::EventSlotNode<E>;
@@ -222,10 +222,10 @@ class EventSlot : public Event<E>
222222
NodeId nodeId = castedPtr->GetInputNodeId();
223223
auto& graphPtr = GetInternals(this->GetGroup()).GetGraphPtr();
224224

225-
graphPtr->PushInput(nodeId, [this, castedPtr, &input] { castedPtr->AddInput(SameGroupOrLink(GetGroup(), input)); });
225+
graphPtr->PushInput(nodeId, [this, castedPtr, &input] { castedPtr->AddSlotInput(SameGroupOrLink(GetGroup(), input)); });
226226
}
227227

228-
void RemoveInput(const Event<E>& input)
228+
void RemoveSlotInput(const Event<E>& input)
229229
{
230230
using REACT_IMPL::NodeId;
231231
using SlotNodeType = REACT_IMPL::EventSlotNode<E>;
@@ -235,10 +235,10 @@ class EventSlot : public Event<E>
235235
NodeId nodeId = castedPtr->GetInputNodeId();
236236
auto& graphPtr = GetInternals(this->GetGroup()).GetGraphPtr();
237237

238-
graphPtr->PushInput(nodeId, [this, castedPtr, &input] { castedPtr->RemoveInput(SameGroupOrLink(GetGroup(), input)); });
238+
graphPtr->PushInput(nodeId, [this, castedPtr, &input] { castedPtr->RemoveSlotInput(SameGroupOrLink(GetGroup(), input)); });
239239
}
240240

241-
void RemoveAllInputs()
241+
void RemoveAllSlotInputs()
242242
{
243243
using REACT_IMPL::NodeId;
244244
using SlotNodeType = REACT_IMPL::EventSlotNode<E>;
@@ -248,7 +248,7 @@ class EventSlot : public Event<E>
248248
NodeId nodeId = castedPtr->GetInputNodeId();
249249
auto& graphPtr = GetInternals(this->GetGroup()).GetGraphPtr();
250250

251-
graphPtr->PushInput(nodeId, [castedPtr] { castedPtr->RemoveAllInputs(); });
251+
graphPtr->PushInput(nodeId, [castedPtr] { castedPtr->RemoveAllSlotInputs(); });
252252
}
253253
};
254254

0 commit comments

Comments
 (0)