Fix a misdiagnosis in MSVC 17.11 (#17723)

Mo' compiler, mo' problems.
This commit is contained in:
Leonard Hecker 2024-08-15 18:33:43 +02:00 committed by GitHub
parent 1511d2c2ad
commit bf44b6c360
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 16 additions and 0 deletions

View File

@ -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 :

View File

@ -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:

View File

@ -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:

View File

@ -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;