Merge pull request #4927 from lioncash/unique-ptr

VertexManagerBase: Make CreateNativeVertexFormat return a unique_ptr
This commit is contained in:
Markus Wick
2017-02-18 12:40:00 +01:00
committed by GitHub
15 changed files with 36 additions and 21 deletions

View File

@ -161,7 +161,7 @@ static VertexLoaderBase* RefreshLoader(int vtx_attr_group, bool preprocess = fal
std::unique_ptr<NativeVertexFormat>& native = s_native_vertex_map[format];
if (!native)
{
native.reset(g_vertex_manager->CreateNativeVertexFormat(format));
native = g_vertex_manager->CreateNativeVertexFormat(format);
}
loader->m_native_vertex_format = native.get();
}

View File

@ -56,7 +56,7 @@ public:
void Flush();
virtual NativeVertexFormat*
virtual std::unique_ptr<NativeVertexFormat>
CreateNativeVertexFormat(const PortableVertexDeclaration& vtx_decl) = 0;
void DoState(PointerWrap& p);