Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix msvc build -- STRICT is a msvc macro name #450

Merged
merged 2 commits into from
Sep 6, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading