@@ -119,7 +119,7 @@ class AllTop : public EdgeFunction<L>,
119119 const L TopElement;
120120
121121public:
122- AllTop (const L TopElement) : TopElement(std::move(TopElement)) {}
122+ AllTop (L TopElement) : TopElement(std::move(TopElement)) {}
123123
124124 ~AllTop () override = default ;
125125
@@ -160,33 +160,18 @@ class AllBottom : public EdgeFunction<L>,
160160 const L BottomElement;
161161
162162public:
163- AllBottom (const L BottomElement) : BottomElement(std::move(BottomElement)) {}
163+ AllBottom (L BottomElement) : BottomElement(std::move(BottomElement)) {}
164164
165165 ~AllBottom () override = default ;
166166
167167 L computeTarget (L /* Source*/ ) override { return BottomElement; }
168168
169- EdgeFunctionPtrType composeWith (EdgeFunctionPtrType SecondFunction) override {
170- if (auto *AB = dynamic_cast <AllBottom<L> *>(SecondFunction.get ())) {
171- return this ->shared_from_this ();
172- }
173- if (auto *EI = dynamic_cast <EdgeIdentity<L> *>(SecondFunction.get ())) {
174- return this ->shared_from_this ();
175- }
176- return SecondFunction->composeWith (this ->shared_from_this ());
169+ EdgeFunctionPtrType
170+ composeWith (EdgeFunctionPtrType /* SecondFunction*/ ) override {
171+ return this ->shared_from_this ();
177172 }
178173
179- EdgeFunctionPtrType joinWith (EdgeFunctionPtrType OtherFunction) override {
180- if (OtherFunction.get () == this ||
181- OtherFunction->equal_to (this ->shared_from_this ())) {
182- return this ->shared_from_this ();
183- }
184- if (auto *Alltop = dynamic_cast <AllTop<L> *>(OtherFunction.get ())) {
185- return this ->shared_from_this ();
186- }
187- if (auto *EI = dynamic_cast <EdgeIdentity<L> *>(OtherFunction.get ())) {
188- return this ->shared_from_this ();
189- }
174+ EdgeFunctionPtrType joinWith (EdgeFunctionPtrType /* OtherFunction*/ ) override {
190175 return this ->shared_from_this ();
191176 }
192177
0 commit comments