mirror of
https://git.mirrors.martin98.com/https://github.com/syoyo/tinygltf.git
synced 2025-08-12 09:29:01 +08:00
Initialize Accessor::Sparse members to default values
This commit is contained in:
parent
a5e653e46c
commit
bd7255e095
20
tiny_gltf.h
20
tiny_gltf.h
@ -834,20 +834,20 @@ struct Accessor {
|
|||||||
maxValues; // optional. integer value is promoted to double
|
maxValues; // optional. integer value is promoted to double
|
||||||
|
|
||||||
struct Sparse {
|
struct Sparse {
|
||||||
int count;
|
int count{0};
|
||||||
bool isSparse;
|
bool isSparse{false};
|
||||||
struct {
|
struct {
|
||||||
size_t byteOffset;
|
size_t byteOffset{0};
|
||||||
int bufferView;
|
int bufferView{-1};
|
||||||
int componentType; // a TINYGLTF_COMPONENT_TYPE_ value
|
int componentType{-1}; // a TINYGLTF_COMPONENT_TYPE_ value
|
||||||
Value extras;
|
Value extras;
|
||||||
ExtensionMap extensions;
|
ExtensionMap extensions;
|
||||||
std::string extras_json_string;
|
std::string extras_json_string;
|
||||||
std::string extensions_json_string;
|
std::string extensions_json_string;
|
||||||
} indices;
|
} indices;
|
||||||
struct {
|
struct {
|
||||||
int bufferView;
|
int bufferView{-1};
|
||||||
size_t byteOffset;
|
size_t byteOffset{0};
|
||||||
Value extras;
|
Value extras;
|
||||||
ExtensionMap extensions;
|
ExtensionMap extensions;
|
||||||
std::string extras_json_string;
|
std::string extras_json_string;
|
||||||
@ -898,11 +898,7 @@ struct Accessor {
|
|||||||
// unreachable return 0;
|
// unreachable return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
Accessor()
|
Accessor() = default;
|
||||||
|
|
||||||
{
|
|
||||||
sparse.isSparse = false;
|
|
||||||
}
|
|
||||||
DEFAULT_METHODS(Accessor)
|
DEFAULT_METHODS(Accessor)
|
||||||
bool operator==(const tinygltf::Accessor &) const;
|
bool operator==(const tinygltf::Accessor &) const;
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user