Changeset 2692 in Sophya for trunk/SophyaLib/BaseTools


Ignore:
Timestamp:
Apr 26, 2005, 2:05:16 PM (20 years ago)
Author:
ansari
Message:

Ajout operateur = pour SegDataBlock<T> SwSegDataBlock<T> pour eviter l utilisation d'un operateur = genere par le compilo - Reza 26/4/2005

Location:
trunk/SophyaLib/BaseTools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaLib/BaseTools/segdatablock.h

    r2660 r2692  
    192192    return (*this);
    193193  }
     194  //! Equal operator. Clones and copie values from \b a
     195  inline SegDataBlock<T>& operator = (const SegDataBlock<T> & a)
     196  {
     197    Clone(a, true);
     198    return (*this);
     199  }
    194200
    195201  //! ASCII formatted output (print)
  • trunk/SophyaLib/BaseTools/swsegdb.h

    r2660 r2692  
    113113    return mSRef->buff;
    114114  }
     115
     116  //! Equal operator. Shares the data with \b a
     117  inline SwSegDataBlock<T>&  operator = (const SwSegDataBlock<T>& a)
     118  {
     119    Delete();
     120    mSRef = a.mSRef;
     121    mSRef->nref++;
     122  }
     123
    115124  //! Return the position tag (swap position) table
    116125  std::vector< int_8 > & GetSwapPosTagTable() const
Note: See TracChangeset for help on using the changeset viewer.