cyclegraph: template-ize checkReachable()
[model-checker.git] / cyclegraph.cc
index 46b0d4ac4eb803df74d57e53148d0d463f343e26..54b91238d98b2d22155a45a838da9a3b655d376c 100644 (file)
@@ -275,12 +275,13 @@ void CycleGraph::dumpGraphToFile(const char *filename) const
 #endif
 
 /**
- * Checks whether one ModelAction can reach another.
+ * Checks whether one ModelAction can reach another ModelAction/Promise
  * @param from The ModelAction from which to begin exploration
- * @param to The ModelAction to reach
+ * @param to The ModelAction or Promise to reach
  * @return True, @a from can reach @a to; otherwise, false
  */
-bool CycleGraph::checkReachable(const ModelAction *from, const ModelAction *to) const
+template <typename T>
+bool CycleGraph::checkReachable(const ModelAction *from, const T *to) const
 {
        CycleNode *fromnode = actionToNode.get(from);
        CycleNode *tonode = actionToNode.get(to);