Changeset 12356


Ignore:
Timestamp:
06/04/12 11:06:03 (13 years ago)
Author:
utke
Message:

rename to IssmDouble and use the memcpy wrapper

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/objects/Contour.cpp

    r12314 r12356  
    2424}
    2525/*}}}*/
    26 /*FUNCTION Contour::Contour(int pid, int nods, double* x, double* y,bool closed) {{{1*/
    27 Contour::Contour(int pid,int pnods, double* px, double* py,bool pclosed){
     26/*FUNCTION Contour::Contour(int pid, int nods, IssmDouble* x, IssmDouble* y,bool closed) {{{1*/
     27Contour::Contour(int pid,int pnods, IssmDouble* px, IssmDouble* py,bool pclosed){
    2828       
    2929        this->id=pid;
     
    3131        this->closed=pclosed;
    3232        if(nods){
    33                 this->x=(double*)xmalloc(nods*sizeof(double));
    34                 memcpy(this->x,px,nods*sizeof(double));
    35                 this->y=(double*)xmalloc(nods*sizeof(double));
    36                 memcpy(this->y,py,nods*sizeof(double));
     33                this->x=xNew<IssmDouble>(nods);
     34                xMemCpy<IssmDouble>(this->x,px,nods);
     35                this->y=xNew<IssmDouble>(nods);
     36                xMemCpy<IssmDouble>(this->y,py,nods);
    3737        }
    3838}
     
    4040/*FUNCTION Contour::Contour() default constructor {{{1*/
    4141Contour::~Contour(){
    42         xfree((void**)&this->x);
    43         xfree((void**)&this->y);
     42        xDelete<IssmDouble>(this->x);
     43        xDelete<IssmDouble>(this->y);
    4444}
    4545/*}}}*/
Note: See TracChangeset for help on using the changeset viewer.