File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -148,7 +148,9 @@ class State : public WithUniqueID {
148148 return this ->outgoingEdges ;
149149 }
150150
151- void removeOutgoingEdge (Edge &e) { this ->outgoingEdges .erase (&e); }
151+ void removeOutgoingEdge (const Edge &e) {
152+ this ->outgoingEdges .erase (const_cast <Edge*>(&e));
153+ }
152154 void insertOutgoingEdge (Edge &e) { this ->outgoingEdges .insert (&e); }
153155
154156private:
@@ -459,7 +461,7 @@ class FiniteStateMachine : public Abstract::FiniteStateMachine {
459461 };
460462
461463 void removeEdge (const Edge<StateLabelType, EdgeLabelType> &e) {
462- auto csrc = dynamic_cast <State<StateLabelType, EdgeLabelType> &>(e.getSource ());
464+ auto csrc = dynamic_cast <const State<StateLabelType, EdgeLabelType> &>(e.getSource ());
463465 // get a non-const version of the state
464466 auto src = this ->getStateLabeled (csrc.getLabel ());
465467 src.removeOutgoingEdge (e);
You can’t perform that action at this time.
0 commit comments