Ignore:
Timestamp:
11/24/06 00:24:41 (18 years ago)
Author:
mattausch
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/Lib/Vis/Preprocessing/src/Pvs.h

    r1764 r1786  
    407407void Pvs<T, S>::MergeInPlace(const Pvs<T, S> &a) 
    408408{ 
     409        // early exit 
     410        if (a.Empty()) 
     411        { 
     412                return; 
     413        } 
     414        else if (Empty()) 
     415        { 
     416                mEntries.reserve(a.GetSize()); 
     417                mEntries = a.mEntries; 
     418                mSamples = a.mSamples; 
     419                return; 
     420        } 
     421 
    409422        ObjectPvs interPvs; 
    410423         
     
    467480        mEntries.clear(); 
    468481        mSamples = 0; 
    469         vector<PvsEntry<T,S> >().swap(mEntries); 
     482 
     483        if (trim) 
     484        { 
     485                vector<PvsEntry<T,S> >().swap(mEntries); 
     486        } 
    470487} 
    471488 
     
    473490template <typename T, typename S> void Pvs<T, S>::Trim() 
    474491{ 
    475         vector<PvsEntry<T,S> >(mEntries).swap(mEntries);//trim vi 
     492        vector<PvsEntry<T,S> >(mEntries).swap(mEntries); 
    476493} 
    477494 
Note: See TracChangeset for help on using the changeset viewer.