fixed types

This commit is contained in:
Brad Hefta-Gaub 2014-01-22 14:09:39 -08:00
parent aacad00791
commit 34dc1a698e
3 changed files with 11 additions and 11 deletions

View file

@ -79,7 +79,7 @@ bool ParticleServer::hasSpecialPacketToSend(Node* node) {
uint64_t deletedParticlesSentAt = nodeData->getLastDeletedParticlesSentAt();
ParticleTree* tree = static_cast<ParticleTree*>(_tree);
shouldSendDeletedParticles = tree->hasParitclesDeletedSince(deletedParticlesSentAt);
shouldSendDeletedParticles = tree->hasParticlesDeletedSince(deletedParticlesSentAt);
}
return shouldSendDeletedParticles;
@ -99,7 +99,7 @@ int ParticleServer::sendSpecialPacket(Node* node) {
// TODO: is it possible to send too many of these packets? what if you deleted 1,000,000 particles?
while (hasMoreToSend) {
hasMoreToSend = tree->encodeParitclesDeletedSince(deletedParticlesSentAt,
hasMoreToSend = tree->encodeParticlesDeletedSince(deletedParticlesSentAt,
outputBuffer, MAX_PACKET_SIZE, packetLength);
//qDebug() << "sending PACKET_TYPE_PARTICLE_ERASE packetLength:" << packetLength;
@ -118,7 +118,7 @@ int ParticleServer::sendSpecialPacket(Node* node) {
void ParticleServer::pruneDeletedParticles() {
ParticleTree* tree = static_cast<ParticleTree*>(_tree);
if (tree->hasAnyDeletedParitcles()) {
if (tree->hasAnyDeletedParticles()) {
//qDebug() << "there are some deleted particles to consider...";
uint64_t earliestLastDeletedParticlesSent = usecTimestampNow() + 1; // in the future
@ -132,7 +132,7 @@ void ParticleServer::pruneDeletedParticles() {
}
}
//qDebug() << "earliestLastDeletedParticlesSent=" << earliestLastDeletedParticlesSent;
tree->forgetParitclesDeletedBefore(earliestLastDeletedParticlesSent);
tree->forgetParticlesDeletedBefore(earliestLastDeletedParticlesSent);
}
}

View file

@ -306,7 +306,7 @@ void ParticleTree::update() {
}
bool ParticleTree::hasParitclesDeletedSince(uint64_t sinceTime) {
bool ParticleTree::hasParticlesDeletedSince(uint64_t sinceTime) {
// we can probably leverage the ordered nature of QMultiMap to do this quickly...
bool hasSomethingNewer = false;
@ -325,7 +325,7 @@ bool ParticleTree::hasParitclesDeletedSince(uint64_t sinceTime) {
}
// sinceTime is an in/out parameter - it will be side effected with the last time sent out
bool ParticleTree::encodeParitclesDeletedSince(uint64_t& sinceTime, unsigned char* outputBuffer, size_t maxLength,
bool ParticleTree::encodeParticlesDeletedSince(uint64_t& sinceTime, unsigned char* outputBuffer, size_t maxLength,
size_t& outputLength) {
bool hasMoreToSend = true;
@ -389,7 +389,7 @@ bool ParticleTree::encodeParitclesDeletedSince(uint64_t& sinceTime, unsigned cha
}
// called by the server when it knows all nodes have been sent deleted packets
void ParticleTree::forgetParitclesDeletedBefore(uint64_t sinceTime) {
void ParticleTree::forgetParticlesDeletedBefore(uint64_t sinceTime) {
_recentlyDeletedParticlesLock.lockForWrite();
QMultiMap<uint64_t, uint32_t>::const_iterator iterator = _recentlyDeletedParticleIDs.constBegin();
while (iterator != _recentlyDeletedParticleIDs.constEnd()) {

View file

@ -46,10 +46,10 @@ public:
void addNewlyCreatedHook(NewlyCreatedParticleHook* hook);
void removeNewlyCreatedHook(NewlyCreatedParticleHook* hook);
bool hasAnyDeletedParitcles() const { return _recentlyDeletedParticleIDs.size() > 0; }
bool hasParitclesDeletedSince(uint64_t sinceTime);
bool encodeParitclesDeletedSince(uint64_t& sinceTime, unsigned char* packetData, size_t maxLength, size_t& outputLength);
void forgetParitclesDeletedBefore(uint64_t sinceTime);
bool hasAnyDeletedParticles() const { return _recentlyDeletedParticleIDs.size() > 0; }
bool hasParticlesDeletedSince(uint64_t sinceTime);
bool encodeParticlesDeletedSince(uint64_t& sinceTime, unsigned char* packetData, size_t maxLength, size_t& outputLength);
void forgetParticlesDeletedBefore(uint64_t sinceTime);
void processEraseMessage(const QByteArray& dataByteArray, const HifiSockAddr& senderSockAddr, Node* sourceNode);