Skip to content

Commit

Permalink
Merge pull request #450 from nyalldawson/fix_win
Browse files Browse the repository at this point in the history
Fix msvc build -- STRICT is a msvc macro name
  • Loading branch information
syoyo authored Sep 6, 2023
2 parents 62cc925 + bbc1eae commit fe6a182
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tiny_gltf.h
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,8 @@ typedef enum {
} Type;

typedef enum {
PERMISSIVE,
STRICT
Permissive,
Strict
} ParseStrictness;

static inline int32_t GetComponentSizeInBytes(uint32_t componentType) {
Expand Down Expand Up @@ -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?

Expand Down Expand Up @@ -5059,6 +5059,7 @@ static bool ParsePrimitive(Primitive *primitive, Model *model,
#else
(void)model;
(void)warn;
(void)strictness;
#endif

return true;
Expand Down Expand Up @@ -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 "
Expand Down

0 comments on commit fe6a182

Please sign in to comment.