@@ -197,7 +197,7 @@ class FiniteStateMachine {
197197 FiniteStateMachine (FiniteStateMachine &&) = default ;
198198 FiniteStateMachine &operator =(FiniteStateMachine &&) = delete ;
199199
200- [[nodiscard]] virtual const State &getInitialState () const = 0;
200+ [[nodiscard]] virtual State &getInitialState () = 0;
201201};
202202
203203//
@@ -414,7 +414,7 @@ class FiniteStateMachine : public Abstract::FiniteStateMachine {
414414private:
415415 SetOfStates<StateLabelType, EdgeLabelType> states;
416416 Abstract::SetOfEdges edges;
417- const State<StateLabelType, EdgeLabelType> *initialState;
417+ State<StateLabelType, EdgeLabelType> *initialState;
418418
419419public:
420420 FiniteStateMachine () : Abstract::FiniteStateMachine(), initialState(nullptr ){};
@@ -473,12 +473,12 @@ class FiniteStateMachine : public Abstract::FiniteStateMachine {
473473 this ->initialState = this ->states .withLabel (label);
474474 };
475475
476- void setInitialState (const State<StateLabelType, EdgeLabelType>& s) {
476+ void setInitialState (State<StateLabelType, EdgeLabelType>& s) {
477477 // we are asumming s is one of our states
478478 this ->initialState = &s;
479479 };
480480
481- [[nodiscard]] const State<StateLabelType, EdgeLabelType> &getInitialState () const override {
481+ [[nodiscard]] State<StateLabelType, EdgeLabelType> &getInitialState () override {
482482 return *this ->initialState ;
483483 };
484484
@@ -854,6 +854,7 @@ using ELSSetOfEdgeRefs = ::FSM::Abstract::SetOfEdgeRefs;
854854
855855class EdgeLabeledScenarioFSM : public ::FSM::Labeled::FiniteStateMachine<CId, CString> {
856856public:
857+ EdgeLabeledScenarioFSM () = default ;
857858 ~EdgeLabeledScenarioFSM () override = default ;
858859
859860 EdgeLabeledScenarioFSM (const EdgeLabeledScenarioFSM &) = delete ;
@@ -887,8 +888,8 @@ class State : public Labeled::State<CString, char> {
887888
888889class FiniteStateMachine : public Labeled ::FiniteStateMachine<CString, char > {
889890public:
890- const State &getInitialState () {
891- return dynamic_cast <const State &>(
891+ State &getInitialState () {
892+ return dynamic_cast <State &>(
892893 Labeled::FiniteStateMachine<CString, char >::getInitialState ());
893894 };
894895
@@ -930,7 +931,7 @@ class FiniteStateMachine : public Abstract::FiniteStateMachine {
930931 const Abstract::FiniteStateMachine &fsm2) :
931932 fsm_a (fsm1), fsm_b(fsm2) {}
932933
933- std::shared_ptr< State> getInitialState ();
934+ State& getInitialState ();
934935
935936 [[nodiscard]] virtual bool matchEdges (const Abstract::Edge &e1 ,
936937 const Abstract::Edge &e2 ) const = 0;
0 commit comments