@@ -646,7 +646,7 @@ fg::Error fg::glTF::parse(Category categories) {
646
646
647
647
void fg::glTF::parseAccessors (simdjson::ondemand::array accessors) {
648
648
using namespace simdjson ;
649
- // parsedAsset->accessors.reserve(accessors.count_elements());
649
+ parsedAsset->accessors .reserve (accessors.count_elements ());
650
650
651
651
for (auto accessorValue : accessors) {
652
652
// Required fields: "componentType", "count"
@@ -759,7 +759,7 @@ void fg::glTF::parseAccessors(simdjson::ondemand::array accessors) {
759
759
760
760
void fg::glTF::parseAnimations (simdjson::ondemand::array animations) {
761
761
using namespace simdjson ;
762
- // parsedAsset->animations.reserve(animations.count_elements());
762
+ parsedAsset->animations .reserve (animations.count_elements ());
763
763
764
764
for (auto animationValue : animations) {
765
765
ondemand::object animationObject;
@@ -774,7 +774,7 @@ void fg::glTF::parseAnimations(simdjson::ondemand::array animations) {
774
774
SET_ERROR_RETURN (Error::InvalidGltf)
775
775
}
776
776
777
- // animation.channels.reserve(channels.count_elements());
777
+ animation.channels .reserve (channels.count_elements ());
778
778
for (auto channelValue : channels) {
779
779
ondemand::object channelObject;
780
780
AnimationChannel channel = {};
@@ -824,7 +824,7 @@ void fg::glTF::parseAnimations(simdjson::ondemand::array animations) {
824
824
SET_ERROR_RETURN (Error::InvalidGltf)
825
825
}
826
826
827
- // animation.samplers.reserve(samplers.count_elements());
827
+ animation.samplers .reserve (samplers.count_elements ());
828
828
for (auto samplerValue : samplers) {
829
829
ondemand::object samplerObject;
830
830
AnimationSampler sampler = {};
@@ -876,7 +876,7 @@ void fg::glTF::parseAnimations(simdjson::ondemand::array animations) {
876
876
877
877
void fg::glTF::parseBuffers (simdjson::ondemand::array buffers) {
878
878
using namespace simdjson ;
879
- // parsedAsset->buffers.reserve(buffers.count_elements());
879
+ parsedAsset->buffers .reserve (buffers.count_elements ());
880
880
881
881
size_t bufferIndex = 0 ;
882
882
for (auto bufferValue : buffers) {
@@ -944,7 +944,7 @@ void fg::glTF::parseBuffers(simdjson::ondemand::array buffers) {
944
944
945
945
void fg::glTF::parseBufferViews (simdjson::ondemand::array bufferViews) {
946
946
using namespace simdjson ;
947
- // parsedAsset->bufferViews.reserve(bufferViews.count_elements());
947
+ parsedAsset->bufferViews .reserve (bufferViews.count_elements ());
948
948
949
949
for (auto bufferViewValue : bufferViews) {
950
950
// Required fields: "bufferIndex", "byteLength"
@@ -1049,7 +1049,7 @@ void fg::glTF::parseBufferViews(simdjson::ondemand::array bufferViews) {
1049
1049
1050
1050
void fg::glTF::parseCameras (simdjson::ondemand::array cameras) {
1051
1051
using namespace simdjson ;
1052
- // parsedAsset->cameras.reserve(cameras.count_elements());
1052
+ parsedAsset->cameras .reserve (cameras.count_elements ());
1053
1053
1054
1054
for (auto cameraValue : cameras) {
1055
1055
Camera camera = {};
@@ -1139,7 +1139,7 @@ void fg::glTF::parseCameras(simdjson::ondemand::array cameras) {
1139
1139
1140
1140
void fg::glTF::parseImages (simdjson::ondemand::array images) {
1141
1141
using namespace simdjson ;
1142
- // parsedAsset->images.reserve(images.count_elements());
1142
+ parsedAsset->images .reserve (images.count_elements ());
1143
1143
1144
1144
for (auto imageValue : images) {
1145
1145
Image image = {};
@@ -1197,7 +1197,7 @@ void fg::glTF::parseImages(simdjson::ondemand::array images) {
1197
1197
1198
1198
void fg::glTF::parseMaterials (simdjson::ondemand::array materials) {
1199
1199
using namespace simdjson ;
1200
- // parsedAsset->materials.reserve(materials.count_elements());
1200
+ parsedAsset->materials .reserve (materials.count_elements ());
1201
1201
1202
1202
for (auto materialValue : materials) {
1203
1203
ondemand::object materialObject;
@@ -1334,7 +1334,7 @@ void fg::glTF::parseMaterials(simdjson::ondemand::array materials) {
1334
1334
1335
1335
void fg::glTF::parseMeshes (simdjson::ondemand::array meshes) {
1336
1336
using namespace simdjson ;
1337
- // parsedAsset->meshes.reserve(meshes.count_elements());
1337
+ parsedAsset->meshes .reserve (meshes.count_elements ());
1338
1338
1339
1339
for (auto meshValue : meshes) {
1340
1340
// Required fields: "primitives"
@@ -1351,7 +1351,7 @@ void fg::glTF::parseMeshes(simdjson::ondemand::array meshes) {
1351
1351
} else if (meshError != Error::None) {
1352
1352
SET_ERROR_RETURN (meshError)
1353
1353
} else {
1354
- // mesh.primitives.reserve(array.count_elements());
1354
+ mesh.primitives .reserve (array.count_elements ());
1355
1355
for (auto primitiveValue : array) {
1356
1356
// Required fields: "attributes"
1357
1357
Primitive primitive = {};
@@ -1441,7 +1441,7 @@ void fg::glTF::parseMeshes(simdjson::ondemand::array meshes) {
1441
1441
1442
1442
void fg::glTF::parseNodes (simdjson::ondemand::array nodes) {
1443
1443
using namespace simdjson ;
1444
- // parsedAsset->nodes.reserve(nodes.count_elements());
1444
+ parsedAsset->nodes .reserve (nodes.count_elements ());
1445
1445
1446
1446
for (auto nodeValue : nodes) {
1447
1447
Node node = {};
@@ -1570,7 +1570,7 @@ void fg::glTF::parseNodes(simdjson::ondemand::array nodes) {
1570
1570
void fg::glTF::parseSamplers (simdjson::ondemand::array samplers) {
1571
1571
using namespace simdjson ;
1572
1572
uint64_t number;
1573
- // parsedAsset->samplers.reserve(samplers.count_elements());
1573
+ parsedAsset->samplers .reserve (samplers.count_elements ());
1574
1574
1575
1575
for (auto samplerValue : samplers) {
1576
1576
Sampler sampler = {};
@@ -1609,7 +1609,7 @@ void fg::glTF::parseSamplers(simdjson::ondemand::array samplers) {
1609
1609
1610
1610
void fg::glTF::parseScenes (simdjson::ondemand::array scenes) {
1611
1611
using namespace simdjson ;
1612
- // parsedAsset->scenes.reserve(scenes.count_elements());
1612
+ parsedAsset->scenes .reserve (scenes.count_elements ());
1613
1613
for (auto sceneValue : scenes) {
1614
1614
// The scene object can be completely empty
1615
1615
Scene scene = {};
@@ -1628,7 +1628,7 @@ void fg::glTF::parseScenes(simdjson::ondemand::array scenes) {
1628
1628
ondemand::array nodes;
1629
1629
auto nodeError = getJsonArray (sceneObject, " nodes" , &nodes);
1630
1630
if (nodeError == Error::None) {
1631
- // scene.nodeIndices.reserve(nodes.count_elements());
1631
+ scene.nodeIndices .reserve (nodes.count_elements ());
1632
1632
for (auto nodeValue : nodes) {
1633
1633
uint64_t index;
1634
1634
if (nodeValue.get_uint64 ().get (index) != SUCCESS) {
@@ -1647,7 +1647,7 @@ void fg::glTF::parseScenes(simdjson::ondemand::array scenes) {
1647
1647
1648
1648
void fg::glTF::parseSkins (simdjson::ondemand::array skins) {
1649
1649
using namespace simdjson ;
1650
- // parsedAsset->skins.reserve(skins.count_elements());
1650
+ parsedAsset->skins .reserve (skins.count_elements ());
1651
1651
1652
1652
for (auto skinValue : skins) {
1653
1653
Skin skin = {};
@@ -1668,7 +1668,7 @@ void fg::glTF::parseSkins(simdjson::ondemand::array skins) {
1668
1668
if (skinObject[" joints" ].get_array ().get (jointsArray) != SUCCESS) {
1669
1669
SET_ERROR_RETURN (Error::InvalidGltf)
1670
1670
}
1671
- // skin.joints.reserve(jointsArray.count_elements());
1671
+ skin.joints .reserve (jointsArray.count_elements ());
1672
1672
for (auto jointValue : jointsArray) {
1673
1673
if (jointValue.get_uint64 ().get (index) != SUCCESS) {
1674
1674
SET_ERROR_RETURN (Error::InvalidGltf)
@@ -1767,7 +1767,7 @@ fg::Error fg::glTF::parseTextureObject(void* object, std::string_view key, Textu
1767
1767
1768
1768
void fg::glTF::parseTextures (simdjson::ondemand::array textures) {
1769
1769
using namespace simdjson ;
1770
- // parsedAsset->textures.reserve(textures.count_elements());
1770
+ parsedAsset->textures .reserve (textures.count_elements ());
1771
1771
1772
1772
for (auto textureValue : textures) {
1773
1773
Texture texture;
0 commit comments