Merge pull request #450 from nyalldawson/fix_win

Fix msvc build -- STRICT is a msvc macro name
This commit is contained in:
Syoyo Fujita 2023-09-07 05:59:12 +09:00 committed by GitHub
commit fe6a18269f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -196,8 +196,8 @@ typedef enum {
} Type;
typedef enum {
PERMISSIVE,
STRICT
Permissive,
Strict
} ParseStrictness;
static inline int32_t GetComponentSizeInBytes(uint32_t componentType) {
@ -1562,7 +1562,7 @@ class TinyGLTF {
size_t bin_size_ = 0;
bool is_binary_ = false;
ParseStrictness strictness_ = ParseStrictness::STRICT;
ParseStrictness strictness_ = ParseStrictness::Strict;
bool serialize_default_values_ = false; ///< Serialize default values?
@ -5059,6 +5059,7 @@ static bool ParsePrimitive(Primitive *primitive, Model *model,
#else
(void)model;
(void)warn;
(void)strictness;
#endif
return true;
@ -5253,7 +5254,7 @@ static bool ParseMaterial(Material *material, std::string *err, std::string *war
if (ParseNumberArrayProperty(&material->emissiveFactor, err, o,
"emissiveFactor",
/* required */ false)) {
if (strictness==ParseStrictness::PERMISSIVE && material->emissiveFactor.size() == 4) {
if (strictness==ParseStrictness::Permissive && material->emissiveFactor.size() == 4) {
if (warn) {
(*warn) +=
"Array length of `emissiveFactor` parameter in "