Ignore:
Timestamp:
Oct 29, 2011, 4:43:41 PM (14 years ago)
Author:
dmik
Message:

common: Use malloc/free for void pointers instead of new/delete.

This fixes GCC warnings and is more clear anyway (new/delete is for
types with the known structure).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/gcc-kmk/tools/common/kFileInterfaces.cpp

    r8003 r21760  
    1919*   Header Files                                                               *
    2020*******************************************************************************/
     21#include <malloc.h>
     22
    2123#include "kTypes.h"
    2224#include "kError.h"
     
    6365     * Save the target we are searching for references to.
    6466     */
    65     PXREFSTATE  pState = new XREFSTATE;
     67    PXREFSTATE  pState = (PXREFSTATE)malloc(sizeof(XREFSTATE));
    6668    pState->ulSegment = ulSegment;
    6769    pState->offSegment = offSegment;
     
    131133    kASSERT(preloc != NULL);
    132134    relocFindClose(preloc);
    133     delete preloc->pv2;
     135    free(preloc->pv2);
    134136    preloc->pv2 = NULL;
    135137}
Note: See TracChangeset for help on using the changeset viewer.