Fixed every (hopefully) CID cases of delete where delete[] should have been used. CID 122, 123, 124, 125, 126, 127, 128, 129, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 142, 143, 144, 147, 148, 149, 150

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27703 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stefano Ceccherini 2008-09-23 09:52:45 +00:00
parent 08facac73e
commit c9e6288649
11 changed files with 19 additions and 23 deletions

View File

@ -298,7 +298,7 @@ void PCL6Driver::rasterGraphics(
uchar *outBuffer = new uchar[dataSize];
pack_bits(outBuffer, buffer, bufferSize);
fWriter->Append(outBuffer, dataSize);
delete outBuffer;
delete[] outBuffer;
return;
} else if (compressionMethod == PCL6Writer::kDeltaRowCompression) {
// use delta row compression

View File

@ -125,7 +125,7 @@ bool Mask::Equals(CIDescription* description) const {
if (buffer == NULL) return false;
bool ok = file.Read(buffer, Length()) == Length() &&
memcmp(desc->Mask(), buffer, Length()) == 0;
delete buffer;
delete[] buffer;
return ok;
}
}

View File

@ -78,7 +78,7 @@ void Report::Add(kind kind, int32 page, const char* fmt, ...) {
#endif
vsprintf(b, fmt, list);
AddItem(new ReportRecord(kind, page, "", b));
delete b;
delete[] b;
va_end(list);
}
}

View File

@ -293,10 +293,8 @@ PkgDirectory::_HandleAttributes(BPath *destination, BNode *node,
break;
}
if (attrData)
delete attrData;
if (temp)
delete temp;
delete[] attrData;
delete[] temp;
}
return ret;
@ -612,10 +610,8 @@ PkgFile::WriteToPath(const char *path, BPath *final)
break;
}
if (attrData)
delete attrData;
if (temp)
delete temp;
delete[] attrData;
delete[] temp;
}
if (final) {

View File

@ -703,7 +703,7 @@ Scaler::DownScaleBilinear(intType fromRow, int32 toRow)
}
}
delete columnData;
delete[] columnData;
}
// Flyod-Steinberg Dithering
@ -877,7 +877,7 @@ Scaler::Dither(int32 fromRow, int32 toRow)
}
}
delete columnData0;
delete[] columnData0;
}
int32

View File

@ -380,7 +380,7 @@ Hey(BMessenger* target, const char* arg, BMessage* reply)
int32 argx = 0;
status_t ret = Hey(target, (char **)argv.Items(), &argx, argv.CountItems()-1, reply);
// This used to be "return Hey(...);"---so tokens wasn't delete'd. -- pfolk@uni.uiuc.edu 1999-11-03
delete tokens;
delete[] tokens;
return ret;
}

View File

@ -155,7 +155,7 @@ void BMailProtocolConfigView::SetTo(BMessage *archive) {
if (password)
{
SetTextControl(this,"pass",password);
delete password;
delete[] password;
}
else
SetTextControl(this,"pass",archive->FindString("password"));

View File

@ -371,7 +371,7 @@ status_t BNetBuffer::AppendMessage( const BMessage& Msg )
result = dpush( B_MESSAGE_TYPE, msgLen, msgData );
}
delete msgData;
delete[] msgData;
return result;
}

View File

@ -117,7 +117,7 @@ void HalftonePreviewView::preview(float gamma, float min, Halftone::DitherType d
dstRow += preview.BytesPerRow();
}
delete buffer;
delete[] buffer;
SetViewBitmap(&preview);
Invalidate();

View File

@ -167,7 +167,7 @@ void PrintJobReader::BuildPageIndex()
fJobFile.Seek(next_page, SEEK_SET);
} else {
fNumberOfPages = 0;
delete fPageIndex;
delete[] fPageIndex;
fPageIndex = NULL;
return;
}

View File

@ -1437,7 +1437,7 @@ MapView::_DrawKey(uint32 keyCode)
if (str) {
bool hasGlyphs;
if (deadKey > 0) {
delete str;
delete[] str;
switch (deadKey) {
case 1: str = strdup("'"); break;
case 2: str = strdup("`"); break;
@ -1461,7 +1461,7 @@ MapView::_DrawKey(uint32 keyCode)
}
DrawString(str, point);
}
delete str;
delete[] str;
}
}
@ -1570,7 +1570,7 @@ MapView::MessageReceived(BMessage *msg)
fTextView->FakeKeyDown(str, numBytes);
}
}
delete str;
delete[] str;
}
}
break;
@ -1611,7 +1611,7 @@ MapView::MouseDown(BPoint point)
fCurrentMap->GetChars(fCurrentMouseKey, fOldKeyInfo.modifiers, fActiveDeadKey, &str, &numBytes);
if (numBytes > 0) {
fTextView->FakeKeyDown(str, numBytes);
delete str;
delete[] str;
}
SetTracking(true);
SetMouseEventMask(B_POINTER_EVENTS,
@ -1649,7 +1649,7 @@ MapView::MouseMoved(BPoint point, uint32 transit, const BMessage *msg)
fCurrentMap->GetChars(fCurrentMouseKey, fOldKeyInfo.modifiers, fActiveDeadKey, &str, &numBytes);
if (numBytes > 0) {
fTextView->FakeKeyDown(str, numBytes);
delete str;
delete[] str;
}
break;
}