File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -266,7 +266,7 @@ class DepthFirstSearch {
266266
267267 virtual void onSimpleCycle (DfsStack &stack){};
268268
269- explicit DepthFirstSearch (FiniteStateMachine &targetFsm) : fsm(targetFsm){};
269+ explicit DepthFirstSearch (const FiniteStateMachine &targetFsm) : fsm(targetFsm){};
270270
271271 // Execute the depth first search
272272 void DoDepthFirstSearch (const StateRef &startingState, bool fullDFS = false ) {
@@ -319,15 +319,15 @@ class DepthFirstSearch {
319319 }
320320
321321protected:
322- FiniteStateMachine &fsm;
322+ const FiniteStateMachine &fsm;
323323};
324324
325325// Check for cycles
326326class DetectCycle : public DepthFirstSearch {
327327public:
328328 bool hasCycle = false ;
329329
330- explicit DetectCycle (FiniteStateMachine &targetFsm) : DepthFirstSearch(targetFsm){};
330+ explicit DetectCycle (const FiniteStateMachine &targetFsm) : DepthFirstSearch(targetFsm){};
331331
332332 ~DetectCycle () override = default ;
333333
You can’t perform that action at this time.
0 commit comments