HMDL_RT: Make use of std::make_unique

More straightforward than using raw new within a reset() call.
This commit is contained in:
Lioncash 2020-04-05 09:05:34 -04:00
parent ebb0a161c3
commit 45556184b4
1 changed files with 2 additions and 2 deletions

View File

@ -20,8 +20,8 @@ HMDLData::HMDLData(boo::IGraphicsDataFactory::Context& ctx, const void* metaData
m_vbo = ctx.newStaticBuffer(boo::BufferUse::Vertex, vbo, meta.vertStride, meta.vertCount);
m_ibo = ctx.newStaticBuffer(boo::BufferUse::Index, ibo, 4, meta.indexCount);
size_t elemCount = 2 + meta.colorCount + meta.uvCount + meta.weightCount;
m_vtxFmtData.reset(new boo::VertexElementDescriptor[elemCount]);
const size_t elemCount = 2 + meta.colorCount + meta.uvCount + meta.weightCount;
m_vtxFmtData = std::make_unique<boo::VertexElementDescriptor[]>(elemCount);
m_vtxFmtData[0].semantic = boo::VertexSemantic::Position3;
m_vtxFmtData[1].semantic = boo::VertexSemantic::Normal3;