From ae25a32913e3a0f8a5945705f08bf47e3d12307b Mon Sep 17 00:00:00 2001 From: Michael Niksa Date: Tue, 3 Sep 2019 15:18:01 -0700 Subject: [PATCH] C26497, you can mark this thing as constexpr. --- src/types/inc/utils.hpp | 2 +- src/types/utils.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/types/inc/utils.hpp b/src/types/inc/utils.hpp index e6f9e9240..11cc46b3b 100644 --- a/src/types/inc/utils.hpp +++ b/src/types/inc/utils.hpp @@ -28,7 +28,7 @@ namespace Microsoft::Console::Utils void InitializeCampbellColorTableForConhost(const gsl::span table); void SwapANSIColorOrderForConhost(const gsl::span table); void Initialize256ColorTable(const gsl::span table); - void SetColorTableAlpha(const gsl::span table, const BYTE newAlpha) noexcept; + constexpr void SetColorTableAlpha(const gsl::span table, const BYTE newAlpha) noexcept; constexpr uint16_t EndianSwap(uint16_t value) { diff --git a/src/types/utils.cpp b/src/types/utils.cpp index 44d4cefc0..536cd40d2 100644 --- a/src/types/utils.cpp +++ b/src/types/utils.cpp @@ -454,7 +454,7 @@ void Utils::Initialize256ColorTable(const gsl::span table) // - newAlpha: the new value to use as the alpha for all the entries in that table. // Return Value: // - -void Utils::SetColorTableAlpha(const gsl::span table, const BYTE newAlpha) noexcept +constexpr void Utils::SetColorTableAlpha(const gsl::span table, const BYTE newAlpha) noexcept { const auto shiftedAlpha = newAlpha << 24; for (auto& color : table)