Skip to content

Code Cleanup - Member variables not initialized in GdiEngine's constructor #887

@dlong11

Description

@dlong11

Minor Code cleanup

In src/renderer/gdi/state.cpp
GdiEngine's constructor is not initializing all of it's member variables.

_isTrueTypeFont
_fontCodepage
_tmFontMetrics
_coordFontLast
_psInvalidData

In Debug only
_debugWindow
_debugContext

As far as I can tell, none of the above variables are used before being initialized (in the normal code path). Most of these get set in UpdateFont and _CreateDebugWindow. It might make sense to make a pass and initialize these in the header with default values. Some members are correctly being set to a default value in the constructor, but it might be better for maintainability to remove those and initialize them in the header also.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-BuildIssues pertaining to the build system, CI, infrastructure, metaIssue-BugIt either shouldn't be doing this or needs an investigation.Product-ConhostFor issues in the Console codebase

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions