mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-28 19:58:53 +00:00
VertexManagerBase: Make CreateNativeVertexFormat return a unique_ptr
Much safer as opposed to just returning raw allocated memory.
This commit is contained in:
parent
82734fffaa
commit
1fa81f24d3
15 changed files with 36 additions and 21 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue