Changeset 13173


Ignore:
Timestamp:
08/28/12 14:49:23 (13 years ago)
Author:
jschierm
Message:

CHG: Removed xrealloc from KMLMeshWrite.cpp.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/modules/KMLMeshWrite/KMLMeshWrite.cpp

    r13038 r13173  
    1111        char*   name=NULL;
    1212        char*   notes=NULL;
     13        char*   notes2=NULL;
    1314        const mxArray* notesi;
    1415        mwIndex        nindex;
     
    6061                                else {
    6162/*  note that strlen does not include trailing null  */
    62                                         notes=(char*)xrealloc(notes,(strlen(notes)+1+mxGetNumberOfElements(notesi)+1)*sizeof(char));
     63                                        notes2=xNew<char>(strlen(notes)+1+mxGetNumberOfElements(notesi)+1);
     64                                        memcpy(notes2,notes,(strlen(notes)+1)*sizeof(char));
     65                                        xDelete<char>(notes);
     66                                        notes=notes2;
     67                                        notes2=NULL;
     68//                                      notes=(char*)xrealloc(notes,(strlen(notes)+1+mxGetNumberOfElements(notesi)+1)*sizeof(char));
    6369                                        strcat(notes,"\n");
    6470                                        mxGetString(notesi,&notes[strlen(notes)],mxGetNumberOfElements(notesi)+1);
Note: See TracChangeset for help on using the changeset viewer.