C26493, no C-style casts.

This commit is contained in:
Michael Niksa
2019-08-29 12:45:16 -07:00
parent b33a59816e
commit c63289b114
4 changed files with 19 additions and 19 deletions

View File

@@ -102,12 +102,12 @@ void TextAttribute::SetLegacyAttributes(const WORD attrs,
{
if (setForeground)
{
const BYTE fgIndex = (BYTE)(attrs & FG_ATTRS);
const BYTE fgIndex = gsl::narrow_cast<BYTE>(attrs & FG_ATTRS);
_foreground = TextColor(fgIndex);
}
if (setBackground)
{
const BYTE bgIndex = (BYTE)(attrs & BG_ATTRS) >> 4;
const BYTE bgIndex = gsl::narrow_cast<BYTE>(attrs & BG_ATTRS) >> 4;
_background = TextColor(bgIndex);
}
if (setMeta)