Compiles
[iotcloud.git] / version2 / src / C / Entry.cc
index 538a68631caaf0e1a1aa2a66dc2655c6fe1e504a..097967bdae7d7af455e59283c93e49185e923cdd 100644 (file)
 Entry *Entry_decode(Slot *slot, ByteBuffer *bb) {
        char type = bb->get();
        switch (type) {
-
        case TypeCommitPart:
                return CommitPart_decode(slot, bb);
-
        case TypeAbort:
                return Abort_decode(slot, bb);
-
        case TypeTransactionPart:
                return TransactionPart_decode(slot, bb);
-
        case TypeNewKey:
                return NewKey_decode(slot, bb);
-
        case TypeLastMessage:
                return LastMessage_decode(slot, bb);
-
        case TypeRejectedMessage:
                return RejectedMessage_decode(slot, bb);
        case TypeTableStatus:
@@ -45,14 +39,10 @@ Entry *Entry_decode(Slot *slot, ByteBuffer *bb) {
 }
 
 void Entry::setDead() {
-
-       if (!islive ) {
-               return; // already dead
-       }
-
-       islive = false;
-
-       if (parentslot != NULL) {
-               parentslot->decrementLiveCount();
+       if (islive) {
+               islive = false;
+               if (parentslot != NULL) {
+                       parentslot->decrementLiveCount();
+               }
        }
 }