From 1fa81f24d3b24f8b47dfa58040f57bbeb7407c30 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sat, 18 Feb 2017 03:14:30 -0500 Subject: VertexManagerBase: Make CreateNativeVertexFormat return a unique_ptr Much safer as opposed to just returning raw allocated memory. --- Source/Core/VideoCommon/VertexLoaderManager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Source/Core/VideoCommon/VertexLoaderManager.cpp') diff --git a/Source/Core/VideoCommon/VertexLoaderManager.cpp b/Source/Core/VideoCommon/VertexLoaderManager.cpp index 7f8c79c77d..c7a2f46bab 100644 --- a/Source/Core/VideoCommon/VertexLoaderManager.cpp +++ b/Source/Core/VideoCommon/VertexLoaderManager.cpp @@ -161,7 +161,7 @@ static VertexLoaderBase* RefreshLoader(int vtx_attr_group, bool preprocess = fal std::unique_ptr& native = s_native_vertex_map[format]; if (!native) { - native.reset(g_vertex_manager->CreateNativeVertexFormat(format)); + native = g_vertex_manager->CreateNativeVertexFormat(format); } loader->m_native_vertex_format = native.get(); } -- cgit v1.2.3