Skip to content

Commit 659742a

Browse files
committed
remove virtual
1 parent c017fe5 commit 659742a

File tree

3 files changed

+38
-38
lines changed

3 files changed

+38
-38
lines changed

include/libgltf/libgltf.h

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
#define LIBGLTF_MAJOR_VERSION 0
1010
#define LIBGLTF_MINOR_VERSION 1
11-
#define LIBGLTF_PATCH_VERSION 1
11+
#define LIBGLTF_PATCH_VERSION 2
1212

1313
#if defined(UNICODE)
1414
typedef std::wstring GLTFString;
@@ -35,7 +35,7 @@ namespace libgltf
3535
SGlTFProperty();
3636

3737
// Check valid
38-
virtual operator bool() const;
38+
operator bool() const;
3939

4040
std::shared_ptr<struct SExtras> extras;
4141
std::shared_ptr<struct SExtension> extensions;
@@ -49,7 +49,7 @@ namespace libgltf
4949
SGlTFChildofRootProperty();
5050

5151
// Check valid
52-
virtual operator bool() const;
52+
operator bool() const;
5353

5454
// The user-defined name of this object.
5555
GLTFString name;
@@ -64,7 +64,7 @@ namespace libgltf
6464
SMaterial();
6565

6666
// Check valid
67-
virtual operator bool() const;
67+
operator bool() const;
6868

6969
// The alpha cutoff value of the material.
7070
float alphaCutoff;
@@ -93,7 +93,7 @@ namespace libgltf
9393
SAsset();
9494

9595
// Check valid
96-
virtual operator bool() const;
96+
operator bool() const;
9797

9898
// The minimum glTF version that this asset targets.
9999
GLTFString minVersion;
@@ -114,7 +114,7 @@ namespace libgltf
114114
SSampler();
115115

116116
// Check valid
117-
virtual operator bool() const;
117+
operator bool() const;
118118

119119
// s wrapping mode.
120120
int32_t wrapS;
@@ -135,7 +135,7 @@ namespace libgltf
135135
SAnimationSampler();
136136

137137
// Check valid
138-
virtual operator bool() const;
138+
operator bool() const;
139139

140140
// The index of an accessor containing keyframe input values, e.g., time.
141141
std::shared_ptr<struct SGlTFId> input;
@@ -154,7 +154,7 @@ namespace libgltf
154154
SExtras();
155155

156156
// Check valid
157-
virtual operator bool() const;
157+
operator bool() const;
158158
};
159159

160160
/*!
@@ -166,7 +166,7 @@ namespace libgltf
166166
SScene();
167167

168168
// Check valid
169-
virtual operator bool() const;
169+
operator bool() const;
170170

171171
// The indices of each root node.
172172
std::vector<std::shared_ptr<struct SGlTFId>> nodes;
@@ -181,7 +181,7 @@ namespace libgltf
181181
SCameraPerspective();
182182

183183
// Check valid
184-
virtual operator bool() const;
184+
operator bool() const;
185185

186186
// The floating-point aspect ratio of the field of view.
187187
float aspectRatio;
@@ -202,7 +202,7 @@ namespace libgltf
202202
SBufferView();
203203

204204
// Check valid
205-
virtual operator bool() const;
205+
operator bool() const;
206206

207207
// The length of the bufferView in bytes.
208208
int32_t byteLength;
@@ -225,7 +225,7 @@ namespace libgltf
225225
STextureInfo();
226226

227227
// Check valid
228-
virtual operator bool() const;
228+
operator bool() const;
229229

230230
// The index of the texture.
231231
std::shared_ptr<struct SGlTFId> index;
@@ -241,7 +241,7 @@ namespace libgltf
241241
SMaterialNormalTextureInfo();
242242

243243
// Check valid
244-
virtual operator bool() const;
244+
operator bool() const;
245245

246246
// The scalar multiplier applied to each normal vector of the normal texture.
247247
float scale;
@@ -255,7 +255,7 @@ namespace libgltf
255255
SMaterialOcclusionTextureInfo();
256256

257257
// Check valid
258-
virtual operator bool() const;
258+
operator bool() const;
259259

260260
// A scalar multiplier controlling the amount of occlusion applied.
261261
float strength;
@@ -270,7 +270,7 @@ namespace libgltf
270270
SAccessorSparseValues();
271271

272272
// Check valid
273-
virtual operator bool() const;
273+
operator bool() const;
274274

275275
// The index of the bufferView with sparse values. Referenced bufferView can't have ARRAY_BUFFER or ELEMENT_ARRAY_BUFFER target.
276276
std::shared_ptr<struct SGlTFId> bufferView;
@@ -287,7 +287,7 @@ namespace libgltf
287287
SAnimationChannelTarget();
288288

289289
// Check valid
290-
virtual operator bool() const;
290+
operator bool() const;
291291

292292
// The index of the node to target.
293293
std::shared_ptr<struct SGlTFId> node;
@@ -304,7 +304,7 @@ namespace libgltf
304304
SMesh();
305305

306306
// Check valid
307-
virtual operator bool() const;
307+
operator bool() const;
308308

309309
// An array of primitives, each defining geometry to be rendered with a material.
310310
std::vector<std::shared_ptr<struct SMeshPrimitive>> primitives;
@@ -321,7 +321,7 @@ namespace libgltf
321321
SAccessorSparse();
322322

323323
// Check valid
324-
virtual operator bool() const;
324+
operator bool() const;
325325

326326
// Number of entries stored in the sparse array.
327327
int32_t count;
@@ -340,7 +340,7 @@ namespace libgltf
340340
SMeshPrimitive();
341341

342342
// Check valid
343-
virtual operator bool() const;
343+
operator bool() const;
344344

345345
// The index of the accessor that contains the indices.
346346
std::shared_ptr<struct SGlTFId> indices;
@@ -363,7 +363,7 @@ namespace libgltf
363363
SKHR_materials_pbrSpecularGlossinessglTFextension();
364364

365365
// Check valid
366-
virtual operator bool() const;
366+
operator bool() const;
367367

368368
// The specular RGB color of the material.
369369
std::vector<float> specularFactor;
@@ -386,7 +386,7 @@ namespace libgltf
386386
SExtension();
387387

388388
// Check valid
389-
virtual operator bool() const;
389+
operator bool() const;
390390

391391
// Manual code lines
392392
std::map<GLTFString, std::shared_ptr<struct SObject>> properties;
@@ -401,7 +401,7 @@ namespace libgltf
401401
SAnimationChannel();
402402

403403
// Check valid
404-
virtual operator bool() const;
404+
operator bool() const;
405405

406406
// The index of the node and TRS property to target.
407407
std::shared_ptr<struct SAnimationChannelTarget> target;
@@ -417,7 +417,7 @@ namespace libgltf
417417
SGlTFId();
418418

419419
// Check valid
420-
virtual operator bool() const;
420+
operator bool() const;
421421

422422
operator int32_t() const;
423423

@@ -433,7 +433,7 @@ namespace libgltf
433433
SAccessorSparseIndices();
434434

435435
// Check valid
436-
virtual operator bool() const;
436+
operator bool() const;
437437

438438
// The indices data type.
439439
int32_t componentType;
@@ -452,7 +452,7 @@ namespace libgltf
452452
SNode();
453453

454454
// Check valid
455-
virtual operator bool() const;
455+
operator bool() const;
456456

457457
// The node's non-uniform scale, given as the scaling factors along the x, y, and z axes.
458458
std::vector<float> scale;
@@ -483,7 +483,7 @@ namespace libgltf
483483
SAnimation();
484484

485485
// Check valid
486-
virtual operator bool() const;
486+
operator bool() const;
487487

488488
// An array of channels, each of which targets an animation's sampler at a node's property. Different channels of the same animation can't have equal targets.
489489
std::vector<std::shared_ptr<struct SAnimationChannel>> channels;
@@ -500,7 +500,7 @@ namespace libgltf
500500
SSkin();
501501

502502
// Check valid
503-
virtual operator bool() const;
503+
operator bool() const;
504504

505505
// Indices of skeleton nodes, used as joints in this skin.
506506
std::vector<std::shared_ptr<struct SGlTFId>> joints;
@@ -519,7 +519,7 @@ namespace libgltf
519519
SMaterialPBRMetallicRoughness();
520520

521521
// Check valid
522-
virtual operator bool() const;
522+
operator bool() const;
523523

524524
// The roughness of the material.
525525
float roughnessFactor;
@@ -541,7 +541,7 @@ namespace libgltf
541541
SKHR_draco_mesh_compressionextension();
542542

543543
// Check valid
544-
virtual operator bool() const;
544+
operator bool() const;
545545

546546
// A dictionary object, where each key corresponds to an attribute and its unique attribute id stored in the compressed geometry.
547547
std::map<GLTFString, std::shared_ptr<struct SGlTFId>> attributes;
@@ -558,7 +558,7 @@ namespace libgltf
558558
SCamera();
559559

560560
// Check valid
561-
virtual operator bool() const;
561+
operator bool() const;
562562

563563
// Specifies if the camera uses a perspective or orthographic projection.
564564
GLTFString type;
@@ -577,7 +577,7 @@ namespace libgltf
577577
SImage();
578578

579579
// Check valid
580-
virtual operator bool() const;
580+
operator bool() const;
581581

582582
// The image's MIME type.
583583
GLTFString mimeType;
@@ -596,7 +596,7 @@ namespace libgltf
596596
STexture();
597597

598598
// Check valid
599-
virtual operator bool() const;
599+
operator bool() const;
600600

601601
// The index of the image used by this texture.
602602
std::shared_ptr<struct SGlTFId> source;
@@ -613,7 +613,7 @@ namespace libgltf
613613
SCameraOrthographic();
614614

615615
// Check valid
616-
virtual operator bool() const;
616+
operator bool() const;
617617

618618
// The floating-point horizontal magnification of the view. Must not be zero.
619619
float xmag;
@@ -634,7 +634,7 @@ namespace libgltf
634634
SBuffer();
635635

636636
// Check valid
637-
virtual operator bool() const;
637+
operator bool() const;
638638

639639
// The length of the buffer in bytes.
640640
int32_t byteLength;
@@ -651,7 +651,7 @@ namespace libgltf
651651
SAccessor();
652652

653653
// Check valid
654-
virtual operator bool() const;
654+
operator bool() const;
655655

656656
// The number of attributes referenced by this accessor.
657657
int32_t count;
@@ -682,7 +682,7 @@ namespace libgltf
682682
SGlTF();
683683

684684
// Check valid
685-
virtual operator bool() const;
685+
operator bool() const;
686686

687687
// An array of textures.
688688
std::vector<std::shared_ptr<struct STexture>> textures;

tools/batch/glTF_2.0_schema.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ extensions_schema_directories=
66
%(CD)s/../../external/glTF/extensions/2.0/Khronos/KHR_materials_pbrSpecularGlossiness/schema
77
major_version=0
88
minor_version=1
9-
patch_version=1
9+
patch_version=2
1010

1111
[code.headers]
1212
extension.schema.json=%(CD)s/codes/extension.schema.json.h

tools/jsonschematoc11/c11types/c11typestruct.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ def codeHeader(self, codeTypeNames):
132132
codeLines.append(u' %s();' % self.codeTypeName())
133133
codeLines.append(u'')
134134
codeLines.append(u' // Check valid')
135-
codeLines.append(u' virtual operator bool() const;')
135+
codeLines.append(u' operator bool() const;')
136136

137137
if self.c11Type != None:
138138
codeLines.append(u'')

0 commit comments

Comments
 (0)