diff --git a/src/D3D12Sample.cpp b/src/D3D12Sample.cpp index b5ce491..705cff1 100644 --- a/src/D3D12Sample.cpp +++ b/src/D3D12Sample.cpp @@ -1801,13 +1801,14 @@ int Main2(int argc, wchar_t** argv) return (int)ExitCode::Help; } - std::unique_ptr DXGIUsage(new DXGIUsage()); - DXGIUsage->Init(); - g_DXGIUsage = DXGIUsage.get(); + // variable name should not same as class name + std::unique_ptr dxgiUsage = std::make_unique(); + dxgiUsage->Init(); + g_DXGIUsage = dxgiUsage.get(); if(g_CommandLineParameters.m_List) { - DXGIUsage->PrintAdapterList(); + dxgiUsage->PrintAdapterList(); return (int)ExitCode::GPUList; }