add more const qualifiers
[model-checker.git] / action.cc
index 6627714e1089b2ad16c85cc7ef4abe43d77b6f95..68a34aad8c76476084052c8fa615c5c54a502e1f 100644 (file)
--- a/action.cc
+++ b/action.cc
@@ -115,7 +115,7 @@ bool ModelAction::is_synchronizing(const ModelAction *act) const
        return false;
 }
 
-void ModelAction::create_cv(ModelAction *parent)
+void ModelAction::create_cv(const ModelAction *parent)
 {
        ASSERT(cv == NULL);
 
@@ -125,7 +125,7 @@ void ModelAction::create_cv(ModelAction *parent)
                cv = new ClockVector(NULL, this);
 }
 
-void ModelAction::read_from(ModelAction *act)
+void ModelAction::read_from(const ModelAction *act)
 {
        ASSERT(cv);
        if (act->is_release() && this->is_acquire())
@@ -139,7 +139,7 @@ void ModelAction::read_from(ModelAction *act)
  * @return true if this action's thread has synchronized with act's thread
  * since the execution of act, false otherwise.
  */
-bool ModelAction::happens_before(ModelAction *act)
+bool ModelAction::happens_before(const ModelAction *act) const
 {
        return act->cv->synchronized_since(this);
 }