diff --git a/src/buffer/out/OutputCell.cpp b/src/buffer/out/OutputCell.cpp index fef9dcb0288..47e14342cea 100644 --- a/src/buffer/out/OutputCell.cpp +++ b/src/buffer/out/OutputCell.cpp @@ -9,6 +9,10 @@ #include "../../types/inc/convert.hpp" #include "../../inc/conattrs.hpp" +// BODGY: Misdiagnosis in MSVC 17.11: Referencing global constants in the member +// initializer list leads to this warning. Can probably be removed in the future. +#pragma warning(disable : 26493) // Don't use C-style casts (type.4).) + static constexpr TextAttribute InvalidTextAttribute{ INVALID_COLOR, INVALID_COLOR }; OutputCell::OutputCell() noexcept : diff --git a/src/buffer/out/OutputCellIterator.cpp b/src/buffer/out/OutputCellIterator.cpp index 423816437e9..55f49d40a77 100644 --- a/src/buffer/out/OutputCellIterator.cpp +++ b/src/buffer/out/OutputCellIterator.cpp @@ -11,6 +11,10 @@ #include "../../types/inc/GlyphWidth.hpp" #include "../../inc/conattrs.hpp" +// BODGY: Misdiagnosis in MSVC 17.11: Referencing global constants in the member +// initializer list leads to this warning. Can probably be removed in the future. +#pragma warning(disable : 26493) // Don't use C-style casts (type.4).) + static constexpr TextAttribute InvalidTextAttribute{ INVALID_COLOR, INVALID_COLOR, INVALID_COLOR }; // Routine Description: diff --git a/src/buffer/out/OutputCellView.cpp b/src/buffer/out/OutputCellView.cpp index 7240a4d0c29..331068505ca 100644 --- a/src/buffer/out/OutputCellView.cpp +++ b/src/buffer/out/OutputCellView.cpp @@ -5,6 +5,10 @@ #include "OutputCellView.hpp" +// BODGY: Misdiagnosis in MSVC 17.11: Referencing global constants in the member +// initializer list leads to this warning. Can probably be removed in the future. +#pragma warning(disable : 26493) // Don't use C-style casts (type.4).) + // Routine Description: // - Constructs a read-only view of data formatted as a single output buffer cell // Arguments: diff --git a/src/buffer/out/textBuffer.cpp b/src/buffer/out/textBuffer.cpp index 42d057515e9..c4f38d85d91 100644 --- a/src/buffer/out/textBuffer.cpp +++ b/src/buffer/out/textBuffer.cpp @@ -12,6 +12,10 @@ #include "../types/inc/utils.hpp" #include "search.h" +// BODGY: Misdiagnosis in MSVC 17.11: Referencing global constants in the member +// initializer list leads to this warning. Can probably be removed in the future. +#pragma warning(disable : 26493) // Don't use C-style casts (type.4).) + using namespace Microsoft::Console; using namespace Microsoft::Console::Types;