[Analyzers][CPP] Turn on warning 26492 (#23492)

This commit is contained in:
sosssego
2023-02-08 11:54:16 +00:00
committed by GitHub
parent 9168f871af
commit 17475ec705
6 changed files with 15 additions and 6 deletions

View File

@@ -247,6 +247,10 @@ struct VideoCaptureReceiverPin : winrt::implements<VideoCaptureReceiverPin, IPin
if (_captureInputPin)
{
// disable warning 26492 - Don't use const_cast to cast away const
// reset needs 'pmt' to be non-const, we can't easily change the query accept prototype
// because of the inheritance.
#pragma warning(suppress : 26492)
_inputCaptureMediaType.reset(const_cast<AM_MEDIA_TYPE*>(pmt));
}