mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 04:44:11 +02:00
Merge pull request #509 from ZappoMan/bug_fixes
fix several delete/delete[] mismatches
This commit is contained in:
commit
f42f248db2
3 changed files with 7 additions and 7 deletions
|
@ -1151,7 +1151,7 @@ static void sendVoxelEditMessage(PACKET_HEADER header, VoxelDetail& detail) {
|
|||
|
||||
if (createVoxelEditMessage(header, 0, 1, &detail, bufferOut, sizeOut)){
|
||||
AgentList::getInstance()->broadcastToAgents(bufferOut, sizeOut, &AGENT_TYPE_VOXEL, 1);
|
||||
delete bufferOut;
|
||||
delete[] bufferOut;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1287,7 +1287,7 @@ void Application::importVoxels() {
|
|||
}
|
||||
|
||||
if (calculatedOctCode) {
|
||||
delete calculatedOctCode;
|
||||
delete[] calculatedOctCode;
|
||||
}
|
||||
|
||||
// restore the main window's active state
|
||||
|
@ -1339,7 +1339,7 @@ void Application::pasteVoxels() {
|
|||
}
|
||||
|
||||
if (calculatedOctCode) {
|
||||
delete calculatedOctCode;
|
||||
delete[] calculatedOctCode;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -223,7 +223,7 @@ bool createVoxelEditMessage(unsigned char command, short int sequence,
|
|||
actualMessageSize+=lengthOfVoxelData;
|
||||
}
|
||||
// cleanup
|
||||
delete voxelData;
|
||||
delete[] voxelData;
|
||||
}
|
||||
|
||||
if (success) {
|
||||
|
|
|
@ -260,7 +260,7 @@ void VoxelTree::readBitstreamToTree(unsigned char * bitstream, unsigned long int
|
|||
void VoxelTree::deleteVoxelAt(float x, float y, float z, float s, bool stage) {
|
||||
unsigned char* octalCode = pointToVoxel(x,y,z,s,0,0,0);
|
||||
deleteVoxelCodeFromTree(octalCode, stage);
|
||||
delete octalCode; // cleanup memory
|
||||
delete[] octalCode; // cleanup memory
|
||||
}
|
||||
|
||||
|
||||
|
@ -627,7 +627,7 @@ VoxelNode* VoxelTree::getVoxelAt(float x, float y, float z, float s) const {
|
|||
if (*node->getOctalCode() != *octalCode) {
|
||||
node = NULL;
|
||||
}
|
||||
delete octalCode; // cleanup memory
|
||||
delete[] octalCode; // cleanup memory
|
||||
return node;
|
||||
}
|
||||
|
||||
|
@ -635,7 +635,7 @@ void VoxelTree::createVoxel(float x, float y, float z, float s,
|
|||
unsigned char red, unsigned char green, unsigned char blue, bool destructive) {
|
||||
unsigned char* voxelData = pointToVoxel(x,y,z,s,red,green,blue);
|
||||
this->readCodeColorBufferToTree(voxelData, destructive);
|
||||
delete voxelData;
|
||||
delete[] voxelData;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue