diff options
| author | Lioncash <mathew1800@gmail.com> | 2017-02-18 03:14:30 -0500 |
|---|---|---|
| committer | Lioncash <mathew1800@gmail.com> | 2017-02-18 03:16:24 -0500 |
| commit | 1fa81f24d3b24f8b47dfa58040f57bbeb7407c30 (patch) | |
| tree | 82ab0759b059b07f70255f53c96fa100a6aaea36 /Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp | |
| parent | 82734fffaaa393f8ebd18eb218c2f43a9dc8ec8a (diff) | |
VertexManagerBase: Make CreateNativeVertexFormat return a unique_ptr
Much safer as opposed to just returning raw allocated memory.
Diffstat (limited to 'Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp')
| -rw-r--r-- | Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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<NativeVertexFormat> VertexManager::CreateNativeVertexFormat(const PortableVertexDeclaration& vtx_decl) { - return new GLVertexFormat(vtx_decl); + return std::make_unique<GLVertexFormat>(vtx_decl); } static inline GLuint VarToGL(VarType t) |
