Skip to content

vector::emplace_back()なのに一時オブジェクトを生成している #22

Description

@ai2playgame

_motiondata[f.boneName].emplace_back(KeyFrame(f.frameNo, XMLoadFloat4(&f.quaternion),
XMFLOAT2((float)f.bezier[3]/127.0f,(float)f.bezier[7]/127.0f),
XMFLOAT2((float)f.bezier[11] / 127.0f, (float)f.bezier[15] / 127.0f)));

emplace_back()でvectorにオブジェクトを追加しているのに一時オブジェクトを生成しているのは冗長。(書籍中の該当コードはp378)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions