C26497, you can mark this thing as constexpr.

This commit is contained in:
Michael Niksa 2019-09-03 15:18:01 -07:00
parent 93aa9455e2
commit ae25a32913
2 changed files with 2 additions and 2 deletions

View file

@ -28,7 +28,7 @@ namespace Microsoft::Console::Utils
void InitializeCampbellColorTableForConhost(const gsl::span<COLORREF> table);
void SwapANSIColorOrderForConhost(const gsl::span<COLORREF> table);
void Initialize256ColorTable(const gsl::span<COLORREF> table);
void SetColorTableAlpha(const gsl::span<COLORREF> table, const BYTE newAlpha) noexcept;
constexpr void SetColorTableAlpha(const gsl::span<COLORREF> table, const BYTE newAlpha) noexcept;
constexpr uint16_t EndianSwap(uint16_t value)
{

View file

@ -454,7 +454,7 @@ void Utils::Initialize256ColorTable(const gsl::span<COLORREF> table)
// - newAlpha: the new value to use as the alpha for all the entries in that table.
// Return Value:
// - <none>
void Utils::SetColorTableAlpha(const gsl::span<COLORREF> table, const BYTE newAlpha) noexcept
constexpr void Utils::SetColorTableAlpha(const gsl::span<COLORREF> table, const BYTE newAlpha) noexcept
{
const auto shiftedAlpha = newAlpha << 24;
for (auto& color : table)