summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/Vulkan/VertexManager.cpp
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2017-02-18 03:14:30 -0500
committerLioncash <mathew1800@gmail.com>2017-02-18 03:16:24 -0500
commit1fa81f24d3b24f8b47dfa58040f57bbeb7407c30 (patch)
tree82ab0759b059b07f70255f53c96fa100a6aaea36 /Source/Core/VideoBackends/Vulkan/VertexManager.cpp
parent82734fffaaa393f8ebd18eb218c2f43a9dc8ec8a (diff)
VertexManagerBase: Make CreateNativeVertexFormat return a unique_ptr
Much safer as opposed to just returning raw allocated memory.
Diffstat (limited to 'Source/Core/VideoBackends/Vulkan/VertexManager.cpp')
-rw-r--r--Source/Core/VideoBackends/Vulkan/VertexManager.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/Core/VideoBackends/Vulkan/VertexManager.cpp b/Source/Core/VideoBackends/Vulkan/VertexManager.cpp
index 63857a8c42..9a5e821e19 100644
--- a/Source/Core/VideoBackends/Vulkan/VertexManager.cpp
+++ b/Source/Core/VideoBackends/Vulkan/VertexManager.cpp
@@ -63,10 +63,10 @@ bool VertexManager::Initialize()
return true;
}
-NativeVertexFormat*
+std::unique_ptr<NativeVertexFormat>
VertexManager::CreateNativeVertexFormat(const PortableVertexDeclaration& vtx_decl)
{
- return new VertexFormat(vtx_decl);
+ return std::make_unique<VertexFormat>(vtx_decl);
}
void VertexManager::PrepareDrawBuffers(u32 stride)