Changeset 362 for trunk/src/mesh


Ignore:
Timestamp:
Mar 14, 2006 8:43:51 PM (18 years ago)
Author:
cxsong
Message:

use copyArray().
updated comments

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/mesh/grid2d_rect.cc

    r356 r362  
    1414        m_ypts.clear();
    1515
    16         int i;
    17         for (i=0; i < xdim; i++)
    18                 m_xpts.push_back(xpts[i]);
    19 
    20         for (i=0; i < ydim; i++)
    21                 m_ypts.push_back(ypts[i]);
     16        copyArray(xpts, xdim, m_xpts);
     17        copyArray(ypts, ydim, m_ypts);
    2218
    2319        expandData();
     
    2622
    2723}
    28 
    29 /*
    30 void
    31 RpGrid2dRect::copyArray(DataValType* val, int dim, vector<DataValType>& vec)
    32 {
    33         vec.clear();
    34 
    35         for (int i=0; i < dim; i++)
    36                 vec.push_back(val[i]);
    37 }
    38 */
    3924
    4025//
     
    10085}
    10186
    102 //
     87// must expand data before calculating number of bytes
    10388int
    10489RpGrid2dRect::numBytes()
Note: See TracChangeset for help on using the changeset viewer.