From d6b0d0a61f4bd922107bc005de70ee2007fe91d8 Mon Sep 17 00:00:00 2001 From: Syoyo Fujita Date: Sat, 29 Jun 2019 17:31:13 +0900 Subject: [PATCH] Explicitly define copy constructor and copy assignment operator for Model an Node. --- tiny_gltf.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tiny_gltf.h b/tiny_gltf.h index 1c2f1fd..83ededc 100644 --- a/tiny_gltf.h +++ b/tiny_gltf.h @@ -717,6 +717,7 @@ class Node { public: Node() : camera(-1), skin(-1), mesh(-1) {} + // TODO(syoyo): Could use `default` Node(const Node &rhs) { camera = rhs.camera; @@ -734,6 +735,9 @@ class Node { extras = rhs.extras; } ~Node() {} + + Node &operator=(const Node &rhs) = default; + bool operator==(const Node &) const; int camera; // the index of the camera referenced by this node @@ -794,7 +798,12 @@ struct Light { class Model { public: Model() {} + + Model(const Model &) = default; + Model &operator=(const Model &) = default; + ~Model() {} + bool operator==(const Model &) const; std::vector accessors;