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 6ae1d86..dc980db 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);