mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 04:08:55 +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
|
@ -33,10 +33,10 @@ public:
|
|||
void SetupVertexPointers() override {}
|
||||
};
|
||||
|
||||
NativeVertexFormat*
|
||||
std::unique_ptr<NativeVertexFormat>
|
||||
SWVertexLoader::CreateNativeVertexFormat(const PortableVertexDeclaration& vtx_decl)
|
||||
{
|
||||
return new NullNativeVertexFormat(vtx_decl);
|
||||
return std::make_unique<NullNativeVertexFormat>(vtx_decl);
|
||||
}
|
||||
|
||||
SWVertexLoader::SWVertexLoader() : LocalVBuffer(MAXVBUFFERSIZE), LocalIBuffer(MAXIBUFFERSIZE)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue