ホーム » メモ » CArray の要素のコピー

CArray の要素のコピー

FaceA::FaceA (const FaceA& other)
{

// ループによるコピー
  Faces.SetSize(other.Faces.GetSize()) ;
  for (int index=0 ; index<other.Faces.GetSize() ; index++) {
    Faces[index] = other.Faces[index] ;
    }

// CArray::Copy
  Faces.Copy(other.Faces) ;

  }

VC 6 リリース版では体感できなかったが,少なくともデバッグ版では Copy の方がはるかに速かった.

Is this 投稿 useful? Useful Useless 0 of 0 people say this 投稿 is useful.

コメントする

メールアドレスが公開されることはありません。 * が付いている欄は必須項目です