Skip to content

Commit

Permalink
Fix msvc build -- STRICT is a msvc macro name
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Sep 6, 2023
1 parent 5a7b827 commit bbc1eae
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 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 @@ -5254,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 bbc1eae

Please sign in to comment.