microsoft/Terminal

Code Health: Update existing winrt properties to use `GETSET_PROPERTY` when possible

Open

#3988 aperta il 17 dic 2019

Vedi su GitHub
 (0 commenti) (0 reazioni) (0 assegnatari)C++ (3212 fork)batch import
Area-CodeHealthHelp WantedIssue-TaskProduct-Terminal

Metriche repository

Star
 (35.764 star)
Metriche merge PR
 (Merge medio 27g 19h) (24 PR mergiate in 30 g)

Descrizione

Pretty self explanatory. Classes with a bunch of


    uint32_t TerminalSettings::DefaultForeground()
    {
        return _defaultForeground;
    }

    void TerminalSettings::DefaultForeground(uint32_t value)
    {
        _defaultForeground = value;
    }

Is an enormous amount of boilerplate we don't need.

GETSET_PROPERTY(uint32_t, DefaultForeground, DEFAULT_FOREGROUND_WITH_ALPHA);

is better.

Guida contributor