Merge pull request #5138 from lioncash/init
VertexLoaderBase: In-class initialize class members where applicable
This commit is contained in:
commit
4b5995a6e0
|
@ -24,16 +24,9 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
VertexLoaderBase::VertexLoaderBase(const TVtxDesc& vtx_desc, const VAT& vtx_attr)
|
VertexLoaderBase::VertexLoaderBase(const TVtxDesc& vtx_desc, const VAT& vtx_attr)
|
||||||
|
: m_VtxDesc{vtx_desc}, m_vat{vtx_attr}
|
||||||
{
|
{
|
||||||
m_numLoadedVertices = 0;
|
|
||||||
m_VertexSize = 0;
|
|
||||||
m_native_vertex_format = nullptr;
|
|
||||||
m_native_components = 0;
|
|
||||||
memset(&m_native_vtx_decl, 0, sizeof(m_native_vtx_decl));
|
|
||||||
|
|
||||||
SetVAT(vtx_attr);
|
SetVAT(vtx_attr);
|
||||||
m_VtxDesc = vtx_desc;
|
|
||||||
m_vat = vtx_attr;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void VertexLoaderBase::SetVAT(const VAT& vat)
|
void VertexLoaderBase::SetVAT(const VAT& vat)
|
||||||
|
|
|
@ -72,13 +72,13 @@ public:
|
||||||
virtual std::string GetName() const = 0;
|
virtual std::string GetName() const = 0;
|
||||||
|
|
||||||
// per loader public state
|
// per loader public state
|
||||||
int m_VertexSize; // number of bytes of a raw GC vertex
|
int m_VertexSize = 0; // number of bytes of a raw GC vertex
|
||||||
PortableVertexDeclaration m_native_vtx_decl;
|
PortableVertexDeclaration m_native_vtx_decl{};
|
||||||
u32 m_native_components;
|
u32 m_native_components = 0;
|
||||||
|
|
||||||
// used by VertexLoaderManager
|
// used by VertexLoaderManager
|
||||||
NativeVertexFormat* m_native_vertex_format;
|
NativeVertexFormat* m_native_vertex_format = nullptr;
|
||||||
int m_numLoadedVertices;
|
int m_numLoadedVertices = 0;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
VertexLoaderBase(const TVtxDesc& vtx_desc, const VAT& vtx_attr);
|
VertexLoaderBase(const TVtxDesc& vtx_desc, const VAT& vtx_attr);
|
||||||
|
|
Loading…
Reference in New Issue