C26477, don't use 0 or NULL, use nullptr.
This commit is contained in:
parent
23897b1bd4
commit
bd2d5ddb4b
|
@ -481,7 +481,7 @@ CustomTextLayout::CustomTextLayout(IDWriteFactory1* const factory,
|
|||
|
||||
// Prepare the glyph run and description objects by converting our
|
||||
// internal storage representation into something that matches DWrite's structures.
|
||||
DWRITE_GLYPH_RUN glyphRun = { 0 };
|
||||
DWRITE_GLYPH_RUN glyphRun;
|
||||
glyphRun.bidiLevel = run.bidiLevel;
|
||||
glyphRun.fontEmSize = _format->GetFontSize() * run.fontScale;
|
||||
glyphRun.fontFace = run.fontFace.Get();
|
||||
|
@ -491,7 +491,7 @@ CustomTextLayout::CustomTextLayout(IDWriteFactory1* const factory,
|
|||
glyphRun.glyphOffsets = _glyphOffsets.data() + run.glyphStart;
|
||||
glyphRun.isSideways = false;
|
||||
|
||||
DWRITE_GLYPH_RUN_DESCRIPTION glyphRunDescription = { 0 };
|
||||
DWRITE_GLYPH_RUN_DESCRIPTION glyphRunDescription;
|
||||
glyphRunDescription.clusterMap = _glyphClusters.data();
|
||||
glyphRunDescription.localeName = _localeName.data();
|
||||
glyphRunDescription.string = _text.data();
|
||||
|
|
|
@ -158,28 +158,28 @@ DxEngine::~DxEngine()
|
|||
// Trying hardware first for maximum performance, then trying WARP (software) renderer second
|
||||
// in case we're running inside a downlevel VM where hardware passthrough isn't enabled like
|
||||
// for Windows 7 in a VM.
|
||||
const auto hardwareResult = D3D11CreateDevice(NULL,
|
||||
const auto hardwareResult = D3D11CreateDevice(nullptr,
|
||||
D3D_DRIVER_TYPE_HARDWARE,
|
||||
NULL,
|
||||
nullptr,
|
||||
DeviceFlags,
|
||||
FeatureLevels,
|
||||
ARRAYSIZE(FeatureLevels),
|
||||
D3D11_SDK_VERSION,
|
||||
&_d3dDevice,
|
||||
NULL,
|
||||
nullptr,
|
||||
&_d3dDeviceContext);
|
||||
|
||||
if (FAILED(hardwareResult))
|
||||
{
|
||||
RETURN_IF_FAILED(D3D11CreateDevice(NULL,
|
||||
RETURN_IF_FAILED(D3D11CreateDevice(nullptr,
|
||||
D3D_DRIVER_TYPE_WARP,
|
||||
NULL,
|
||||
nullptr,
|
||||
DeviceFlags,
|
||||
FeatureLevels,
|
||||
ARRAYSIZE(FeatureLevels),
|
||||
D3D11_SDK_VERSION,
|
||||
&_d3dDevice,
|
||||
NULL,
|
||||
nullptr,
|
||||
&_d3dDeviceContext));
|
||||
}
|
||||
|
||||
|
|
|
@ -113,7 +113,7 @@ COLORREF Utils::ColorFromHexString(const std::string str)
|
|||
// - True if non zero and not set to invalid magic value. False otherwise.
|
||||
bool Utils::IsValidHandle(const HANDLE handle) noexcept
|
||||
{
|
||||
return handle != 0 && handle != INVALID_HANDLE_VALUE;
|
||||
return handle != nullptr && handle != INVALID_HANDLE_VALUE;
|
||||
}
|
||||
|
||||
// Function Description:
|
||||
|
|
Loading…
Reference in a new issue