-#include"SlotBuffer.h"
+#include "SlotBuffer.h"
/**
* Circular buffer that holds the live set of slots.
* @author Brian Demsky
void SlotBuffer::resize(int newsize) {
if (newsize == (array->length() - 1))
return;
-
- Array<Slot *> * newarray = new Array<Slot *>(newsize + 1);
+
+ Array<Slot *> *newarray = new Array<Slot *>(newsize + 1);
int currsize = size();
int index = tail;
for (int i = 0; i < currsize; i++) {
tail = 0;
}
-void SlotBuffer::putSlot(Slot * s) {
+void SlotBuffer::putSlot(Slot *s) {
int64_t checkNum = (getNewestSeqNum() + 1);
-
+
if (checkNum != s->getSequenceNumber()) {
// We have a gap so expunge all our slots
oldestseqn = s->getSequenceNumber();
array->set(0, s);
return;
}
-
+
array->set(head, s);
incrementHead();
-
+
if (oldestseqn == 0) {
oldestseqn = s->getSequenceNumber();
}