From ae9364902a973cbb72a8ec15ea5e883a64fa4969 Mon Sep 17 00:00:00 2001 From: Eero Pajarre Date: Mon, 18 Nov 2019 12:59:05 +0200 Subject: [PATCH] Added Accessor initializers Added Accessor intializers Now byteOffset and normalized are initialized to their default values. componentType and Type are initialized to bad values on purpose, they must be set when loading or creating the model. --- tiny_gltf.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tiny_gltf.h b/tiny_gltf.h index d866984..720f7f3 100644 --- a/tiny_gltf.h +++ b/tiny_gltf.h @@ -887,8 +887,13 @@ struct Accessor { // unreachable return 0; } - Accessor() { - bufferView = -1; + Accessor() : + bufferView(-1), + byteOffset(0), + normalized(false), + componentType(-1), + count(0), + type(-1){ sparse.isSparse = false; } DEFAULT_METHODS(Accessor)