Changeset 1361 for trunk/yat/utility


Ignore:
Timestamp:
Jul 2, 2008, 11:23:56 PM (13 years ago)
Author:
Peter
Message:

fixing ticket:389 - the problem was in test code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/yat/utility/Index.cc

    r1134 r1361  
    2323
    2424#include "Index.h"
     25
     26#include <cassert>
    2527
    2628namespace theplu {
     
    5759    std::vector<size_t>* vec = new std::vector<size_t>;
    5860    vec->reserve(b.size());
    59     for (size_t i=0; i<b.size(); ++i)
     61    for (size_t i=0; i<b.size(); ++i) {
     62      assert(b[i]<a.size());
    6063      vec->push_back(a[b[i]]);
     64    }
    6165    index_ = SmartPtr<const std::vector<size_t> >(vec);
    6266  }
Note: See TracChangeset for help on using the changeset viewer.