From 60b6a4651e2a58a1b49344bf6e38b4792b2c5647 Mon Sep 17 00:00:00 2001 From: Marco Hutter Date: Wed, 3 Mar 2021 18:08:04 +0100 Subject: [PATCH] Initialize member of handlers --- CesiumGltfReader/generated/AccessorJsonHandler.h | 2 +- CesiumGltfReader/generated/AccessorSparseIndicesJsonHandler.h | 2 +- CesiumGltfReader/generated/AccessorSparseJsonHandler.h | 2 +- CesiumGltfReader/generated/AccessorSparseValuesJsonHandler.h | 2 +- CesiumGltfReader/generated/AnimationChannelJsonHandler.h | 2 +- CesiumGltfReader/generated/AnimationChannelTargetJsonHandler.h | 2 +- CesiumGltfReader/generated/AnimationJsonHandler.h | 2 +- CesiumGltfReader/generated/AnimationSamplerJsonHandler.h | 2 +- CesiumGltfReader/generated/AssetJsonHandler.h | 2 +- CesiumGltfReader/generated/BufferJsonHandler.h | 2 +- CesiumGltfReader/generated/BufferViewJsonHandler.h | 2 +- CesiumGltfReader/generated/CameraJsonHandler.h | 2 +- CesiumGltfReader/generated/CameraOrthographicJsonHandler.h | 2 +- CesiumGltfReader/generated/CameraPerspectiveJsonHandler.h | 2 +- CesiumGltfReader/generated/ImageJsonHandler.h | 2 +- .../generated/KHR_draco_mesh_compressionJsonHandler.h | 2 +- CesiumGltfReader/generated/MaterialJsonHandler.h | 2 +- .../generated/MaterialNormalTextureInfoJsonHandler.h | 2 +- .../generated/MaterialOcclusionTextureInfoJsonHandler.h | 2 +- .../generated/MaterialPBRMetallicRoughnessJsonHandler.h | 2 +- CesiumGltfReader/generated/MeshJsonHandler.h | 2 +- CesiumGltfReader/generated/MeshPrimitiveJsonHandler.h | 2 +- CesiumGltfReader/generated/ModelJsonHandler.h | 2 +- CesiumGltfReader/generated/NodeJsonHandler.h | 2 +- CesiumGltfReader/generated/SamplerJsonHandler.h | 2 +- CesiumGltfReader/generated/SceneJsonHandler.h | 2 +- CesiumGltfReader/generated/SkinJsonHandler.h | 2 +- CesiumGltfReader/generated/TextureInfoJsonHandler.h | 2 +- CesiumGltfReader/generated/TextureJsonHandler.h | 2 +- tools/generate-gltf-classes/generate.js | 2 +- 30 files changed, 30 insertions(+), 30 deletions(-) diff --git a/CesiumGltfReader/generated/AccessorJsonHandler.h b/CesiumGltfReader/generated/AccessorJsonHandler.h index b4410c044..19579950c 100644 --- a/CesiumGltfReader/generated/AccessorJsonHandler.h +++ b/CesiumGltfReader/generated/AccessorJsonHandler.h @@ -34,7 +34,7 @@ namespace CesiumGltf { Accessor::Type* _pEnum = nullptr; }; - Accessor* _pObject; + Accessor* _pObject = nullptr; IntegerJsonHandler _bufferView; IntegerJsonHandler _byteOffset; IntegerJsonHandler _componentType; diff --git a/CesiumGltfReader/generated/AccessorSparseIndicesJsonHandler.h b/CesiumGltfReader/generated/AccessorSparseIndicesJsonHandler.h index aaaa7f3b7..9079be78f 100644 --- a/CesiumGltfReader/generated/AccessorSparseIndicesJsonHandler.h +++ b/CesiumGltfReader/generated/AccessorSparseIndicesJsonHandler.h @@ -22,7 +22,7 @@ namespace CesiumGltf { private: - AccessorSparseIndices* _pObject; + AccessorSparseIndices* _pObject = nullptr; IntegerJsonHandler _bufferView; IntegerJsonHandler _byteOffset; IntegerJsonHandler _componentType; diff --git a/CesiumGltfReader/generated/AccessorSparseJsonHandler.h b/CesiumGltfReader/generated/AccessorSparseJsonHandler.h index e39ae4097..808ba4686 100644 --- a/CesiumGltfReader/generated/AccessorSparseJsonHandler.h +++ b/CesiumGltfReader/generated/AccessorSparseJsonHandler.h @@ -23,7 +23,7 @@ namespace CesiumGltf { private: - AccessorSparse* _pObject; + AccessorSparse* _pObject = nullptr; IntegerJsonHandler _count; AccessorSparseIndicesJsonHandler _indices; AccessorSparseValuesJsonHandler _values; diff --git a/CesiumGltfReader/generated/AccessorSparseValuesJsonHandler.h b/CesiumGltfReader/generated/AccessorSparseValuesJsonHandler.h index 3b1a5e4f6..7a46b0279 100644 --- a/CesiumGltfReader/generated/AccessorSparseValuesJsonHandler.h +++ b/CesiumGltfReader/generated/AccessorSparseValuesJsonHandler.h @@ -21,7 +21,7 @@ namespace CesiumGltf { private: - AccessorSparseValues* _pObject; + AccessorSparseValues* _pObject = nullptr; IntegerJsonHandler _bufferView; IntegerJsonHandler _byteOffset; }; diff --git a/CesiumGltfReader/generated/AnimationChannelJsonHandler.h b/CesiumGltfReader/generated/AnimationChannelJsonHandler.h index ad4cecac2..1a4250496 100644 --- a/CesiumGltfReader/generated/AnimationChannelJsonHandler.h +++ b/CesiumGltfReader/generated/AnimationChannelJsonHandler.h @@ -22,7 +22,7 @@ namespace CesiumGltf { private: - AnimationChannel* _pObject; + AnimationChannel* _pObject = nullptr; IntegerJsonHandler _sampler; AnimationChannelTargetJsonHandler _target; }; diff --git a/CesiumGltfReader/generated/AnimationChannelTargetJsonHandler.h b/CesiumGltfReader/generated/AnimationChannelTargetJsonHandler.h index ee7f709fa..0d04151b3 100644 --- a/CesiumGltfReader/generated/AnimationChannelTargetJsonHandler.h +++ b/CesiumGltfReader/generated/AnimationChannelTargetJsonHandler.h @@ -30,7 +30,7 @@ namespace CesiumGltf { AnimationChannelTarget::Path* _pEnum = nullptr; }; - AnimationChannelTarget* _pObject; + AnimationChannelTarget* _pObject = nullptr; IntegerJsonHandler _node; PathJsonHandler _path; }; diff --git a/CesiumGltfReader/generated/AnimationJsonHandler.h b/CesiumGltfReader/generated/AnimationJsonHandler.h index 2f5bb3d72..17411229e 100644 --- a/CesiumGltfReader/generated/AnimationJsonHandler.h +++ b/CesiumGltfReader/generated/AnimationJsonHandler.h @@ -23,7 +23,7 @@ namespace CesiumGltf { private: - Animation* _pObject; + Animation* _pObject = nullptr; ArrayJsonHandler _channels; ArrayJsonHandler _samplers; }; diff --git a/CesiumGltfReader/generated/AnimationSamplerJsonHandler.h b/CesiumGltfReader/generated/AnimationSamplerJsonHandler.h index e3ab52166..58b0ce2a1 100644 --- a/CesiumGltfReader/generated/AnimationSamplerJsonHandler.h +++ b/CesiumGltfReader/generated/AnimationSamplerJsonHandler.h @@ -30,7 +30,7 @@ namespace CesiumGltf { AnimationSampler::Interpolation* _pEnum = nullptr; }; - AnimationSampler* _pObject; + AnimationSampler* _pObject = nullptr; IntegerJsonHandler _input; InterpolationJsonHandler _interpolation; IntegerJsonHandler _output; diff --git a/CesiumGltfReader/generated/AssetJsonHandler.h b/CesiumGltfReader/generated/AssetJsonHandler.h index 81cca28a7..64dfcbebb 100644 --- a/CesiumGltfReader/generated/AssetJsonHandler.h +++ b/CesiumGltfReader/generated/AssetJsonHandler.h @@ -21,7 +21,7 @@ namespace CesiumGltf { private: - Asset* _pObject; + Asset* _pObject = nullptr; StringJsonHandler _copyright; StringJsonHandler _generator; StringJsonHandler _version; diff --git a/CesiumGltfReader/generated/BufferJsonHandler.h b/CesiumGltfReader/generated/BufferJsonHandler.h index 875ee1afa..7e81e86cd 100644 --- a/CesiumGltfReader/generated/BufferJsonHandler.h +++ b/CesiumGltfReader/generated/BufferJsonHandler.h @@ -22,7 +22,7 @@ namespace CesiumGltf { private: - Buffer* _pObject; + Buffer* _pObject = nullptr; StringJsonHandler _uri; IntegerJsonHandler _byteLength; }; diff --git a/CesiumGltfReader/generated/BufferViewJsonHandler.h b/CesiumGltfReader/generated/BufferViewJsonHandler.h index ef53a355c..eef8a2d81 100644 --- a/CesiumGltfReader/generated/BufferViewJsonHandler.h +++ b/CesiumGltfReader/generated/BufferViewJsonHandler.h @@ -22,7 +22,7 @@ namespace CesiumGltf { private: - BufferView* _pObject; + BufferView* _pObject = nullptr; IntegerJsonHandler _buffer; IntegerJsonHandler _byteOffset; IntegerJsonHandler _byteLength; diff --git a/CesiumGltfReader/generated/CameraJsonHandler.h b/CesiumGltfReader/generated/CameraJsonHandler.h index c32588876..1286c63ba 100644 --- a/CesiumGltfReader/generated/CameraJsonHandler.h +++ b/CesiumGltfReader/generated/CameraJsonHandler.h @@ -31,7 +31,7 @@ namespace CesiumGltf { Camera::Type* _pEnum = nullptr; }; - Camera* _pObject; + Camera* _pObject = nullptr; CameraOrthographicJsonHandler _orthographic; CameraPerspectiveJsonHandler _perspective; TypeJsonHandler _type; diff --git a/CesiumGltfReader/generated/CameraOrthographicJsonHandler.h b/CesiumGltfReader/generated/CameraOrthographicJsonHandler.h index 40fff6b1e..ca1f05b0c 100644 --- a/CesiumGltfReader/generated/CameraOrthographicJsonHandler.h +++ b/CesiumGltfReader/generated/CameraOrthographicJsonHandler.h @@ -21,7 +21,7 @@ namespace CesiumGltf { private: - CameraOrthographic* _pObject; + CameraOrthographic* _pObject = nullptr; DoubleJsonHandler _xmag; DoubleJsonHandler _ymag; DoubleJsonHandler _zfar; diff --git a/CesiumGltfReader/generated/CameraPerspectiveJsonHandler.h b/CesiumGltfReader/generated/CameraPerspectiveJsonHandler.h index 155ae50ba..a08165c00 100644 --- a/CesiumGltfReader/generated/CameraPerspectiveJsonHandler.h +++ b/CesiumGltfReader/generated/CameraPerspectiveJsonHandler.h @@ -21,7 +21,7 @@ namespace CesiumGltf { private: - CameraPerspective* _pObject; + CameraPerspective* _pObject = nullptr; DoubleJsonHandler _aspectRatio; DoubleJsonHandler _yfov; DoubleJsonHandler _zfar; diff --git a/CesiumGltfReader/generated/ImageJsonHandler.h b/CesiumGltfReader/generated/ImageJsonHandler.h index ece963690..ec79eaf5f 100644 --- a/CesiumGltfReader/generated/ImageJsonHandler.h +++ b/CesiumGltfReader/generated/ImageJsonHandler.h @@ -31,7 +31,7 @@ namespace CesiumGltf { Image::MimeType* _pEnum = nullptr; }; - Image* _pObject; + Image* _pObject = nullptr; StringJsonHandler _uri; MimeTypeJsonHandler _mimeType; IntegerJsonHandler _bufferView; diff --git a/CesiumGltfReader/generated/KHR_draco_mesh_compressionJsonHandler.h b/CesiumGltfReader/generated/KHR_draco_mesh_compressionJsonHandler.h index 8312d7991..113106d6e 100644 --- a/CesiumGltfReader/generated/KHR_draco_mesh_compressionJsonHandler.h +++ b/CesiumGltfReader/generated/KHR_draco_mesh_compressionJsonHandler.h @@ -22,7 +22,7 @@ namespace CesiumGltf { private: - KHR_draco_mesh_compression* _pObject; + KHR_draco_mesh_compression* _pObject = nullptr; IntegerJsonHandler _bufferView; DictionaryJsonHandler> _attributes; }; diff --git a/CesiumGltfReader/generated/MaterialJsonHandler.h b/CesiumGltfReader/generated/MaterialJsonHandler.h index 265d9ac48..d8e2cb51d 100644 --- a/CesiumGltfReader/generated/MaterialJsonHandler.h +++ b/CesiumGltfReader/generated/MaterialJsonHandler.h @@ -36,7 +36,7 @@ namespace CesiumGltf { Material::AlphaMode* _pEnum = nullptr; }; - Material* _pObject; + Material* _pObject = nullptr; MaterialPBRMetallicRoughnessJsonHandler _pbrMetallicRoughness; MaterialNormalTextureInfoJsonHandler _normalTexture; MaterialOcclusionTextureInfoJsonHandler _occlusionTexture; diff --git a/CesiumGltfReader/generated/MaterialNormalTextureInfoJsonHandler.h b/CesiumGltfReader/generated/MaterialNormalTextureInfoJsonHandler.h index a6ba3d3a6..dda374f6d 100644 --- a/CesiumGltfReader/generated/MaterialNormalTextureInfoJsonHandler.h +++ b/CesiumGltfReader/generated/MaterialNormalTextureInfoJsonHandler.h @@ -21,7 +21,7 @@ namespace CesiumGltf { private: - MaterialNormalTextureInfo* _pObject; + MaterialNormalTextureInfo* _pObject = nullptr; DoubleJsonHandler _scale; }; } diff --git a/CesiumGltfReader/generated/MaterialOcclusionTextureInfoJsonHandler.h b/CesiumGltfReader/generated/MaterialOcclusionTextureInfoJsonHandler.h index a0d812d6a..ced1077a4 100644 --- a/CesiumGltfReader/generated/MaterialOcclusionTextureInfoJsonHandler.h +++ b/CesiumGltfReader/generated/MaterialOcclusionTextureInfoJsonHandler.h @@ -21,7 +21,7 @@ namespace CesiumGltf { private: - MaterialOcclusionTextureInfo* _pObject; + MaterialOcclusionTextureInfo* _pObject = nullptr; DoubleJsonHandler _strength; }; } diff --git a/CesiumGltfReader/generated/MaterialPBRMetallicRoughnessJsonHandler.h b/CesiumGltfReader/generated/MaterialPBRMetallicRoughnessJsonHandler.h index 39e8a8272..9a14a0a3d 100644 --- a/CesiumGltfReader/generated/MaterialPBRMetallicRoughnessJsonHandler.h +++ b/CesiumGltfReader/generated/MaterialPBRMetallicRoughnessJsonHandler.h @@ -23,7 +23,7 @@ namespace CesiumGltf { private: - MaterialPBRMetallicRoughness* _pObject; + MaterialPBRMetallicRoughness* _pObject = nullptr; ArrayJsonHandler _baseColorFactor; TextureInfoJsonHandler _baseColorTexture; DoubleJsonHandler _metallicFactor; diff --git a/CesiumGltfReader/generated/MeshJsonHandler.h b/CesiumGltfReader/generated/MeshJsonHandler.h index cb9e7814c..ae63acfaf 100644 --- a/CesiumGltfReader/generated/MeshJsonHandler.h +++ b/CesiumGltfReader/generated/MeshJsonHandler.h @@ -23,7 +23,7 @@ namespace CesiumGltf { private: - Mesh* _pObject; + Mesh* _pObject = nullptr; ArrayJsonHandler _primitives; ArrayJsonHandler _weights; }; diff --git a/CesiumGltfReader/generated/MeshPrimitiveJsonHandler.h b/CesiumGltfReader/generated/MeshPrimitiveJsonHandler.h index 5bd507fcd..f548653ad 100644 --- a/CesiumGltfReader/generated/MeshPrimitiveJsonHandler.h +++ b/CesiumGltfReader/generated/MeshPrimitiveJsonHandler.h @@ -34,7 +34,7 @@ namespace CesiumGltf { KHR_draco_mesh_compressionJsonHandler _KHR_draco_mesh_compression; }; - MeshPrimitive* _pObject; + MeshPrimitive* _pObject = nullptr; DictionaryJsonHandler> _attributes; IntegerJsonHandler _indices; IntegerJsonHandler _material; diff --git a/CesiumGltfReader/generated/ModelJsonHandler.h b/CesiumGltfReader/generated/ModelJsonHandler.h index a885d732b..4494fbde5 100644 --- a/CesiumGltfReader/generated/ModelJsonHandler.h +++ b/CesiumGltfReader/generated/ModelJsonHandler.h @@ -37,7 +37,7 @@ namespace CesiumGltf { private: - Model* _pObject; + Model* _pObject = nullptr; ArrayJsonHandler _extensionsUsed; ArrayJsonHandler _extensionsRequired; ArrayJsonHandler _accessors; diff --git a/CesiumGltfReader/generated/NodeJsonHandler.h b/CesiumGltfReader/generated/NodeJsonHandler.h index 1515b89e9..877c9f0ec 100644 --- a/CesiumGltfReader/generated/NodeJsonHandler.h +++ b/CesiumGltfReader/generated/NodeJsonHandler.h @@ -23,7 +23,7 @@ namespace CesiumGltf { private: - Node* _pObject; + Node* _pObject = nullptr; IntegerJsonHandler _camera; ArrayJsonHandler> _children; IntegerJsonHandler _skin; diff --git a/CesiumGltfReader/generated/SamplerJsonHandler.h b/CesiumGltfReader/generated/SamplerJsonHandler.h index db2981232..6473d89c7 100644 --- a/CesiumGltfReader/generated/SamplerJsonHandler.h +++ b/CesiumGltfReader/generated/SamplerJsonHandler.h @@ -22,7 +22,7 @@ namespace CesiumGltf { private: - Sampler* _pObject; + Sampler* _pObject = nullptr; IntegerJsonHandler _magFilter; IntegerJsonHandler _minFilter; IntegerJsonHandler _wrapS; diff --git a/CesiumGltfReader/generated/SceneJsonHandler.h b/CesiumGltfReader/generated/SceneJsonHandler.h index 8c603b808..45b47980b 100644 --- a/CesiumGltfReader/generated/SceneJsonHandler.h +++ b/CesiumGltfReader/generated/SceneJsonHandler.h @@ -22,7 +22,7 @@ namespace CesiumGltf { private: - Scene* _pObject; + Scene* _pObject = nullptr; ArrayJsonHandler> _nodes; }; } diff --git a/CesiumGltfReader/generated/SkinJsonHandler.h b/CesiumGltfReader/generated/SkinJsonHandler.h index 89db00122..832511e0d 100644 --- a/CesiumGltfReader/generated/SkinJsonHandler.h +++ b/CesiumGltfReader/generated/SkinJsonHandler.h @@ -22,7 +22,7 @@ namespace CesiumGltf { private: - Skin* _pObject; + Skin* _pObject = nullptr; IntegerJsonHandler _inverseBindMatrices; IntegerJsonHandler _skeleton; ArrayJsonHandler> _joints; diff --git a/CesiumGltfReader/generated/TextureInfoJsonHandler.h b/CesiumGltfReader/generated/TextureInfoJsonHandler.h index c09a6861a..ced203a12 100644 --- a/CesiumGltfReader/generated/TextureInfoJsonHandler.h +++ b/CesiumGltfReader/generated/TextureInfoJsonHandler.h @@ -21,7 +21,7 @@ namespace CesiumGltf { private: - TextureInfo* _pObject; + TextureInfo* _pObject = nullptr; IntegerJsonHandler _index; IntegerJsonHandler _texCoord; }; diff --git a/CesiumGltfReader/generated/TextureJsonHandler.h b/CesiumGltfReader/generated/TextureJsonHandler.h index 248796942..7a8ead0dd 100644 --- a/CesiumGltfReader/generated/TextureJsonHandler.h +++ b/CesiumGltfReader/generated/TextureJsonHandler.h @@ -21,7 +21,7 @@ namespace CesiumGltf { private: - Texture* _pObject; + Texture* _pObject = nullptr; IntegerJsonHandler _sampler; IntegerJsonHandler _source; }; diff --git a/tools/generate-gltf-classes/generate.js b/tools/generate-gltf-classes/generate.js index e988ab17e..d268ecfb1 100644 --- a/tools/generate-gltf-classes/generate.js +++ b/tools/generate-gltf-classes/generate.js @@ -110,7 +110,7 @@ function generate(options, schema) { private: ${indent(readerLocalTypes.join("\n\n"), 12)} - ${name}* _pObject; + ${name}* _pObject = nullptr; ${indent( properties .map((property) => formatReaderProperty(property))