Changeset 2912


Ignore:
Timestamp:
04/01/14 13:47:06 (11 years ago)
Author:
Takeshi Nakazato
Message:

New Development: No

JIRA Issue: No

Ready for Test: Yes

Interface Changes: No

What Interface Changed: Please list interface changes

Test Programs: List test programs

Put in Release Notes: Yes/No

Module(s): Module Names change impacts.

Description: Describe your changes here...

Minor improvement on STIdxIter2.


File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/STIdxIter.cpp

    r2911 r2912  
    607607void STIdxIter2::init()
    608608{
     609  num_row_ = table_.nrow();
    609610  for (uInt i = 0; i < cols_.size(); ++i) {
    610611    addSortKey(cols_[i]);
    611612  }
    612   num_row_ = table_.nrow();
    613613  sorter_.sort(index_, num_row_);
    614614  num_iter_ = sorter_.unique(unique_, index_);
     
    653653void STIdxIter2::addColumnToKey(const string &name)
    654654{
    655   uInt nrow = table_.nrow();
    656   void *raw_storage = malloc(sizeof(T) * nrow);
     655  void *raw_storage = malloc(sizeof(T) * num_row_);
    657656  T *storage = reinterpret_cast<T*>(raw_storage);
    658   Vector<T> array(IPosition(1, nrow), storage, SHARE);
     657  Vector<T> array(IPosition(1, num_row_), storage, SHARE);
    659658  ROScalarColumn<T> col(table_, name);
    660659  col.getColumn(array);
Note: See TracChangeset for help on using the changeset viewer.