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/VideoBackends/OGL/NativeVertexFormat.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp') diff --git a/Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp b/Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp index c20e21666d..69a6229741 100644 --- a/Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp +++ b/Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp @@ -17,10 +17,10 @@ namespace OGL { -NativeVertexFormat* +std::unique_ptr VertexManager::CreateNativeVertexFormat(const PortableVertexDeclaration& vtx_decl) { - return new GLVertexFormat(vtx_decl); + return std::make_unique(vtx_decl); } static inline GLuint VarToGL(VarType t) -- cgit v1.2.3