2
3
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-14 02:27:40 -04:00

Get rid of NEW(), TRACKED_NEW, and ZERO().

This commit is contained in:
Darryl Pogue
2012-01-21 01:09:48 -08:00
committed by Adam Johnson
parent 30430d3024
commit 5013a978eb
423 changed files with 2500 additions and 2503 deletions

View File

@ -322,7 +322,7 @@ AsyncId W9xFileCreateSequence (
CFile * object = (CFile *)file;
// Queue an operation
FileOp * op = NEW(FileOp);
FileOp * op = new FileOp;
op->code = kNotifyFileSequence;
op->notify = notify;
op->data.flush.param = param;
@ -342,7 +342,7 @@ AsyncId W9xFileFlushBuffers (
CFile * object = (CFile *)file;
// Queue an operation
FileOp * op = NEW(FileOp);
FileOp * op = new FileOp;
op->code = kNotifyFileFlush;
op->notify = notify;
op->data.flush.param = param;
@ -401,7 +401,7 @@ AsyncFile W9xFileOpen (
GetFileTime(fileHandle, nil, nil, (FILETIME *) &lastWriteTime);
// Create a file object
CFile * object = NEW(CFile)(
CFile * object = new CFile(
fileHandle,
notifyProc,
userState
@ -436,7 +436,7 @@ AsyncId W9xFileRead (
// Queue asynchronous operations
else {
FileOp * op = NEW(FileOp);
FileOp * op = new FileOp;
op->code = kNotifyFileRead;
op->notify = (flags & kAsyncFileRwNotify) != 0;
op->data.read.param = param;
@ -492,7 +492,7 @@ AsyncId W9xFileWrite (
// Queue asynchronous operations
else {
FileOp * op = NEW(FileOp);
FileOp * op = new FileOp;
op->code = kNotifyFileWrite;
op->notify = (flags & kAsyncFileRwNotify) != 0;
op->data.write.param = param;

View File

@ -430,8 +430,8 @@ void CSocket::OnConnect () {
// Get addresses for the connection notification
AsyncNotifySocketConnect notify;
ZERO(notify.localAddr);
ZERO(notify.remoteAddr);
memset(&notify.localAddr, 0, sizeof(notify.localAddr));
memset(&notify.remoteAddr, 0, sizeof(notify.remoteAddr));
int nameLen = sizeof(notify.localAddr);
if (getsockname(m_sock, (sockaddr *)&notify.localAddr, &nameLen))
if (GetLastError() == WSAENOTCONN)
@ -656,7 +656,7 @@ void CSocket::QueueConnect (
) {
ASSERT(!IsConnected() && !IsDisconnected());
Command * command = NEW(Command);
Command * command = new Command;
command->code = command->CONNECT;
command->param = param;
command->connect.connType = connType;
@ -671,7 +671,7 @@ void CSocket::QueueWrite (
) {
ASSERT(!IsDisconnected());
Command * command = NEW(Command);
Command * command = new Command;
command->code = command->CONNECT;
command->param = param;
command->write.data = data;
@ -913,7 +913,7 @@ static unsigned THREADCALL W9xSocketThreadProc (AsyncThread *) {
// Register the window class
HINSTANCE instance = (HINSTANCE)GetModuleHandle(nil);
WNDCLASS wndClass;
ZERO(wndClass);
memset(&wndClass, 0, sizeof(wndClass));
wndClass.lpfnWndProc = WndProc;
wndClass.hInstance = instance;
wndClass.lpszClassName = CLASS_NAME;
@ -1027,7 +1027,7 @@ void W9xSocketConnect (
UINT message = (s_message++ & 0x3fff) | WM_APP; // range 0x8000 - 0xbfff
// Create a socket object
CSocket * object = NEW(CSocket)(
CSocket * object = new CSocket(
sequence,
message,
sock,

View File

@ -206,7 +206,7 @@ void CThreadDispObject::Close () {
//===========================================================================
AsyncId CThreadDispObject::Queue (void * op) {
AsyncId asyncId = 0;
NEW(CThreadDispRec)(this, op, &asyncId);
new CThreadDispRec(this, op, &asyncId);
SetEvent(s_signalEvent);
return asyncId;
}