Skip to content

Investigate copy/move assignment operators #43

@mgradwohl

Description

@mgradwohl

Avoid partial construction by implementing copy/move assignment operators/constructors.

e.g. look at Board, Renderer, FPScounter, etc.

instead of constructing in mainwindow.h and then calling Attach(), Start() etc, which means the object isn't correctly initialized until those are called, see if you can implement this pattern.

MainWindow.h
fpscounter fps{nullptr_t}

MainWindow.cpp
fps = fps(foo, bar, blah);

For example Renderer.h has
Microsoft::Graphics::Canvas::CanvasRenderTarget _spritesheet{ nullptr };
Which isn't truly initialized until
Renderer.cpp
_spritesheet = Microsoft::Graphics::Canvas::CanvasRenderTarget(_canvasDevice, _spriteDipsPerRow, _spriteDipsPerRow, _dpi);

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