ホーム » メモ » 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 の方がはるかに速かった.

この投稿は役に立ちましたか ? 0 人中 0 人がこの 投稿 は役に立ったと言っています。

コメントする

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

© 2009-2026 mish.work All Rights Reserved.

Powered by WordPress / Academica WordPress Theme by WPZOOM