Skip to content

Commit

Permalink
Merge pull request #144 from CesiumGS/initialize-gltf-handler-members
Browse files Browse the repository at this point in the history
Initialize member of handlers
  • Loading branch information
kring authored Mar 5, 2021
2 parents 5d991f9 + 60b6a46 commit 3e45ddf
Show file tree
Hide file tree
Showing 30 changed files with 30 additions and 30 deletions.
2 changes: 1 addition & 1 deletion CesiumGltfReader/generated/AccessorJsonHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ namespace CesiumGltf {
Accessor::Type* _pEnum = nullptr;
};

Accessor* _pObject;
Accessor* _pObject = nullptr;
IntegerJsonHandler<int32_t> _bufferView;
IntegerJsonHandler<int64_t> _byteOffset;
IntegerJsonHandler<Accessor::ComponentType> _componentType;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ namespace CesiumGltf {

private:

AccessorSparseIndices* _pObject;
AccessorSparseIndices* _pObject = nullptr;
IntegerJsonHandler<int32_t> _bufferView;
IntegerJsonHandler<int64_t> _byteOffset;
IntegerJsonHandler<AccessorSparseIndices::ComponentType> _componentType;
Expand Down
2 changes: 1 addition & 1 deletion CesiumGltfReader/generated/AccessorSparseJsonHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ namespace CesiumGltf {

private:

AccessorSparse* _pObject;
AccessorSparse* _pObject = nullptr;
IntegerJsonHandler<int64_t> _count;
AccessorSparseIndicesJsonHandler _indices;
AccessorSparseValuesJsonHandler _values;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ namespace CesiumGltf {

private:

AccessorSparseValues* _pObject;
AccessorSparseValues* _pObject = nullptr;
IntegerJsonHandler<int32_t> _bufferView;
IntegerJsonHandler<int64_t> _byteOffset;
};
Expand Down
2 changes: 1 addition & 1 deletion CesiumGltfReader/generated/AnimationChannelJsonHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ namespace CesiumGltf {

private:

AnimationChannel* _pObject;
AnimationChannel* _pObject = nullptr;
IntegerJsonHandler<int32_t> _sampler;
AnimationChannelTargetJsonHandler _target;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ namespace CesiumGltf {
AnimationChannelTarget::Path* _pEnum = nullptr;
};

AnimationChannelTarget* _pObject;
AnimationChannelTarget* _pObject = nullptr;
IntegerJsonHandler<int32_t> _node;
PathJsonHandler _path;
};
Expand Down
2 changes: 1 addition & 1 deletion CesiumGltfReader/generated/AnimationJsonHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ namespace CesiumGltf {

private:

Animation* _pObject;
Animation* _pObject = nullptr;
ArrayJsonHandler<AnimationChannel, AnimationChannelJsonHandler> _channels;
ArrayJsonHandler<AnimationSampler, AnimationSamplerJsonHandler> _samplers;
};
Expand Down
2 changes: 1 addition & 1 deletion CesiumGltfReader/generated/AnimationSamplerJsonHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ namespace CesiumGltf {
AnimationSampler::Interpolation* _pEnum = nullptr;
};

AnimationSampler* _pObject;
AnimationSampler* _pObject = nullptr;
IntegerJsonHandler<int32_t> _input;
InterpolationJsonHandler _interpolation;
IntegerJsonHandler<int32_t> _output;
Expand Down
2 changes: 1 addition & 1 deletion CesiumGltfReader/generated/AssetJsonHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ namespace CesiumGltf {

private:

Asset* _pObject;
Asset* _pObject = nullptr;
StringJsonHandler _copyright;
StringJsonHandler _generator;
StringJsonHandler _version;
Expand Down
2 changes: 1 addition & 1 deletion CesiumGltfReader/generated/BufferJsonHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ namespace CesiumGltf {

private:

Buffer* _pObject;
Buffer* _pObject = nullptr;
StringJsonHandler _uri;
IntegerJsonHandler<int64_t> _byteLength;
};
Expand Down
2 changes: 1 addition & 1 deletion CesiumGltfReader/generated/BufferViewJsonHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ namespace CesiumGltf {

private:

BufferView* _pObject;
BufferView* _pObject = nullptr;
IntegerJsonHandler<int32_t> _buffer;
IntegerJsonHandler<int64_t> _byteOffset;
IntegerJsonHandler<int64_t> _byteLength;
Expand Down
2 changes: 1 addition & 1 deletion CesiumGltfReader/generated/CameraJsonHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ namespace CesiumGltf {
Camera::Type* _pEnum = nullptr;
};

Camera* _pObject;
Camera* _pObject = nullptr;
CameraOrthographicJsonHandler _orthographic;
CameraPerspectiveJsonHandler _perspective;
TypeJsonHandler _type;
Expand Down
2 changes: 1 addition & 1 deletion CesiumGltfReader/generated/CameraOrthographicJsonHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ namespace CesiumGltf {

private:

CameraOrthographic* _pObject;
CameraOrthographic* _pObject = nullptr;
DoubleJsonHandler _xmag;
DoubleJsonHandler _ymag;
DoubleJsonHandler _zfar;
Expand Down
2 changes: 1 addition & 1 deletion CesiumGltfReader/generated/CameraPerspectiveJsonHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ namespace CesiumGltf {

private:

CameraPerspective* _pObject;
CameraPerspective* _pObject = nullptr;
DoubleJsonHandler _aspectRatio;
DoubleJsonHandler _yfov;
DoubleJsonHandler _zfar;
Expand Down
2 changes: 1 addition & 1 deletion CesiumGltfReader/generated/ImageJsonHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ namespace CesiumGltf {
Image::MimeType* _pEnum = nullptr;
};

Image* _pObject;
Image* _pObject = nullptr;
StringJsonHandler _uri;
MimeTypeJsonHandler _mimeType;
IntegerJsonHandler<int32_t> _bufferView;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ namespace CesiumGltf {

private:

KHR_draco_mesh_compression* _pObject;
KHR_draco_mesh_compression* _pObject = nullptr;
IntegerJsonHandler<int32_t> _bufferView;
DictionaryJsonHandler<int32_t, IntegerJsonHandler<int32_t>> _attributes;
};
Expand Down
2 changes: 1 addition & 1 deletion CesiumGltfReader/generated/MaterialJsonHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ namespace CesiumGltf {
Material::AlphaMode* _pEnum = nullptr;
};

Material* _pObject;
Material* _pObject = nullptr;
MaterialPBRMetallicRoughnessJsonHandler _pbrMetallicRoughness;
MaterialNormalTextureInfoJsonHandler _normalTexture;
MaterialOcclusionTextureInfoJsonHandler _occlusionTexture;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ namespace CesiumGltf {

private:

MaterialNormalTextureInfo* _pObject;
MaterialNormalTextureInfo* _pObject = nullptr;
DoubleJsonHandler _scale;
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ namespace CesiumGltf {

private:

MaterialOcclusionTextureInfo* _pObject;
MaterialOcclusionTextureInfo* _pObject = nullptr;
DoubleJsonHandler _strength;
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ namespace CesiumGltf {

private:

MaterialPBRMetallicRoughness* _pObject;
MaterialPBRMetallicRoughness* _pObject = nullptr;
ArrayJsonHandler<double, DoubleJsonHandler> _baseColorFactor;
TextureInfoJsonHandler _baseColorTexture;
DoubleJsonHandler _metallicFactor;
Expand Down
2 changes: 1 addition & 1 deletion CesiumGltfReader/generated/MeshJsonHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ namespace CesiumGltf {

private:

Mesh* _pObject;
Mesh* _pObject = nullptr;
ArrayJsonHandler<MeshPrimitive, MeshPrimitiveJsonHandler> _primitives;
ArrayJsonHandler<double, DoubleJsonHandler> _weights;
};
Expand Down
2 changes: 1 addition & 1 deletion CesiumGltfReader/generated/MeshPrimitiveJsonHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ namespace CesiumGltf {
KHR_draco_mesh_compressionJsonHandler _KHR_draco_mesh_compression;
};

MeshPrimitive* _pObject;
MeshPrimitive* _pObject = nullptr;
DictionaryJsonHandler<int32_t, IntegerJsonHandler<int32_t>> _attributes;
IntegerJsonHandler<int32_t> _indices;
IntegerJsonHandler<int32_t> _material;
Expand Down
2 changes: 1 addition & 1 deletion CesiumGltfReader/generated/ModelJsonHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ namespace CesiumGltf {

private:

Model* _pObject;
Model* _pObject = nullptr;
ArrayJsonHandler<std::string, StringJsonHandler> _extensionsUsed;
ArrayJsonHandler<std::string, StringJsonHandler> _extensionsRequired;
ArrayJsonHandler<Accessor, AccessorJsonHandler> _accessors;
Expand Down
2 changes: 1 addition & 1 deletion CesiumGltfReader/generated/NodeJsonHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ namespace CesiumGltf {

private:

Node* _pObject;
Node* _pObject = nullptr;
IntegerJsonHandler<int32_t> _camera;
ArrayJsonHandler<int32_t, IntegerJsonHandler<int32_t>> _children;
IntegerJsonHandler<int32_t> _skin;
Expand Down
2 changes: 1 addition & 1 deletion CesiumGltfReader/generated/SamplerJsonHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ namespace CesiumGltf {

private:

Sampler* _pObject;
Sampler* _pObject = nullptr;
IntegerJsonHandler<Sampler::MagFilter> _magFilter;
IntegerJsonHandler<Sampler::MinFilter> _minFilter;
IntegerJsonHandler<Sampler::WrapS> _wrapS;
Expand Down
2 changes: 1 addition & 1 deletion CesiumGltfReader/generated/SceneJsonHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ namespace CesiumGltf {

private:

Scene* _pObject;
Scene* _pObject = nullptr;
ArrayJsonHandler<int32_t, IntegerJsonHandler<int32_t>> _nodes;
};
}
2 changes: 1 addition & 1 deletion CesiumGltfReader/generated/SkinJsonHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ namespace CesiumGltf {

private:

Skin* _pObject;
Skin* _pObject = nullptr;
IntegerJsonHandler<int32_t> _inverseBindMatrices;
IntegerJsonHandler<int32_t> _skeleton;
ArrayJsonHandler<int32_t, IntegerJsonHandler<int32_t>> _joints;
Expand Down
2 changes: 1 addition & 1 deletion CesiumGltfReader/generated/TextureInfoJsonHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ namespace CesiumGltf {

private:

TextureInfo* _pObject;
TextureInfo* _pObject = nullptr;
IntegerJsonHandler<int32_t> _index;
IntegerJsonHandler<int64_t> _texCoord;
};
Expand Down
2 changes: 1 addition & 1 deletion CesiumGltfReader/generated/TextureJsonHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ namespace CesiumGltf {

private:

Texture* _pObject;
Texture* _pObject = nullptr;
IntegerJsonHandler<int32_t> _sampler;
IntegerJsonHandler<int32_t> _source;
};
Expand Down
2 changes: 1 addition & 1 deletion tools/generate-gltf-classes/generate.js
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 3e45ddf

Please sign in to comment.