edits
[iotcloud.git] / version2 / src / C / ArbitrationRound.cc
index da21dda20218dcdd7939d3538730d69b94ee6df1..3ddf5cb49852141d216a3f6783cf70dfdabd3e4a 100644 (file)
@@ -17,33 +17,19 @@ ArbitrationRound::ArbitrationRound(Commit *_commit, Hashset<Abort *> *_abortsBef
        currentSize += abortsBefore->size();
 }
 
-/*
-   void ArbitrationRound::generateParts() {
-   if (didGenerateParts) {
-    return;
-   }
-   parts = new Vector<Entry *>((Vector<Entry *> *)abortsBefore);
-   if (commit != NULL) {
-    parts->addAll(commit->getParts()->values());
-   }
-   }*/
+ArbitrationRound::~ArbitrationRound() {
+       delete abortsBefore;
+       delete parts;
+}
 
 Vector<Entry *> *ArbitrationRound::getParts() {
        return parts;
 }
 
-/*
-   void ArbitrationRound::removeParts(Vector<Entry *> * removeParts) {
-   parts->removeAll(removeParts);
-   didSendPart = true;
-   }
- */
-
 bool ArbitrationRound::isDoneSending() {
        if ((commit == NULL) && abortsBefore->isEmpty()) {
                return true;
        }
-
        return parts->isEmpty();
 }
 
@@ -85,10 +71,9 @@ int ArbitrationRound::getCurrentSize() {
 }
 
 bool ArbitrationRound::isFull() {
-       return currentSize >= MAX_PARTS;
+       return currentSize >= ArbitrationRound_MAX_PARTS;
 }
 
 bool ArbitrationRound::getDidSendPart() {
        return didSendPart;
 }
-