[Analyzers][CPP] Turn on warning 26403 (#22795)

This commit is contained in:
sosssego 2023-01-03 09:16:27 -03:00 коммит произвёл GitHub
Родитель dd62dab831
Коммит 6287460614
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
3 изменённых файлов: 13 добавлений и 10 удалений

Просмотреть файл

@ -13,7 +13,7 @@
<Rule Id="C26400" Action="Info" />
<Rule Id="C26401" Action="Info" />
<Rule Id="C26402" Action="Error" />
<Rule Id="C26403" Action="Info" />
<Rule Id="C26403" Action="Error" />
<Rule Id="C26404" Action="Error" />
<Rule Id="C26405" Action="Error" />
<Rule Id="C26406" Action="Error" />

Просмотреть файл

@ -197,13 +197,9 @@ std::unique_ptr<D3DCaptureState> D3DCaptureState::Create(DxgiAPI* dxgiAPI,
swapChain.put()));
// We must create the object in a heap, since we need to pin it in memory to receive callbacks
auto statePtr = new D3DCaptureState{ dxgiAPI,
std::move(swapChain),
pixelFormat,
std::move(monitorInfo),
continuousCapture };
auto statePtr = std::unique_ptr<D3DCaptureState>(new D3DCaptureState{ dxgiAPI, std::move(swapChain), pixelFormat, std::move(monitorInfo), continuousCapture });
return std::unique_ptr<D3DCaptureState>{ statePtr };
return statePtr;
}
D3DCaptureState::~D3DCaptureState()

Просмотреть файл

@ -319,7 +319,14 @@ VideoConferenceModule::VideoConferenceModule()
if (_settingsUpdateChannel)
{
_settingsUpdateChannel->access([](auto memory) {
// Suppress warning 26403 - Reset or explicitly delete an owner<T> pointer 'variable' (r.3)
// the video conference class should be only instantiated once and it is using placement new
// the access to the data can be done through memory._data
#pragma warning(push)
#pragma warning(disable : 26403)
auto updatesChannel = new (memory._data) CameraSettingsUpdateChannel{};
#pragma warning(pop)
});
}
sendSourceCameraNameUpdate();