From d7e26717ec76b225475afe69a463b6e21e026f26 Mon Sep 17 00:00:00 2001 From: Brian Norris Date: Tue, 5 Feb 2013 14:26:24 -0800 Subject: [PATCH] cyclegraph: bugfix - pop edges properly Now that CycleNode's have back-edges, we need to properly remove *both* the forward and back edges when doing roll-back. --- cyclegraph.cc | 2 +- cyclegraph.h | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/cyclegraph.cc b/cyclegraph.cc index eaddc8e..e834cb6 100644 --- a/cyclegraph.cc +++ b/cyclegraph.cc @@ -348,7 +348,7 @@ void CycleGraph::commitChanges() void CycleGraph::rollbackChanges() { for (unsigned int i = 0; i < rollbackvector.size(); i++) - rollbackvector[i]->popEdge(); + rollbackvector[i]->removeEdge(); for (unsigned int i = 0; i < rmwrollbackvector.size(); i++) rmwrollbackvector[i]->clearRMW(); diff --git a/cyclegraph.h b/cyclegraph.h index 749abf8..fcb1d30 100644 --- a/cyclegraph.h +++ b/cyclegraph.h @@ -102,11 +102,6 @@ class CycleNode { void clearRMW() { hasRMW = NULL; } const ModelAction * getAction() const { return action; } const Promise * getPromise() const { return promise; } - - void popEdge() { - edges.pop_back(); - } - bool is_promise() const { return !action; } void resolvePromise(const ModelAction *writer); -- 2.34.1