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:
@ -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;
|
||||
|
@ -430,8 +430,8 @@ void CSocket::OnConnect () {
|
||||
|
||||
// Get addresses for the connection notification
|
||||
AsyncNotifySocketConnect notify;
|
||||
ZERO(notify.localAddr);
|
||||
ZERO(notify.remoteAddr);
|
||||
memset(¬ify.localAddr, 0, sizeof(notify.localAddr));
|
||||
memset(¬ify.remoteAddr, 0, sizeof(notify.remoteAddr));
|
||||
int nameLen = sizeof(notify.localAddr);
|
||||
if (getsockname(m_sock, (sockaddr *)¬ify.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,
|
||||
|
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user