action: replace condition check with ASSERT()
authorBrian Norris <banorris@uci.edu>
Tue, 19 Jun 2012 22:51:06 +0000 (15:51 -0700)
committerBrian Norris <banorris@uci.edu>
Tue, 19 Jun 2012 22:51:06 +0000 (15:51 -0700)
Now that the ModelChecker and NodeStack have been refactored a bit, I don't
need to rely on create_cv() to avoid overwriting a previously-existing
clockvector; create_cv() will now be called at most once per ModelAction. So
change this condition to an ASSERT().

action.cc

index 6ae1d861150151133b7b878525705aac9fa5e910..dc980dbcdaaeb81c5e8a70939c1f4259ea48e3a7 100644 (file)
--- a/action.cc
+++ b/action.cc
@@ -117,8 +117,7 @@ bool ModelAction::is_synchronizing(ModelAction *act)
 
 void ModelAction::create_cv(ModelAction *parent)
 {
-       if (cv)
-               return;
+       ASSERT(cv == NULL);
 
        if (parent)
                cv = new ClockVector(parent->cv, this);