mirror of
https://git.mirrors.martin98.com/https://github.com/syoyo/tinygltf.git
synced 2025-07-13 03:21:47 +08:00
Merge pull request #450 from nyalldawson/fix_win
Fix msvc build -- STRICT is a msvc macro name
This commit is contained in:
commit
fe6a18269f
@ -196,8 +196,8 @@ typedef enum {
|
|||||||
} Type;
|
} Type;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
PERMISSIVE,
|
Permissive,
|
||||||
STRICT
|
Strict
|
||||||
} ParseStrictness;
|
} ParseStrictness;
|
||||||
|
|
||||||
static inline int32_t GetComponentSizeInBytes(uint32_t componentType) {
|
static inline int32_t GetComponentSizeInBytes(uint32_t componentType) {
|
||||||
@ -1562,7 +1562,7 @@ class TinyGLTF {
|
|||||||
size_t bin_size_ = 0;
|
size_t bin_size_ = 0;
|
||||||
bool is_binary_ = false;
|
bool is_binary_ = false;
|
||||||
|
|
||||||
ParseStrictness strictness_ = ParseStrictness::STRICT;
|
ParseStrictness strictness_ = ParseStrictness::Strict;
|
||||||
|
|
||||||
bool serialize_default_values_ = false; ///< Serialize default values?
|
bool serialize_default_values_ = false; ///< Serialize default values?
|
||||||
|
|
||||||
@ -5059,6 +5059,7 @@ static bool ParsePrimitive(Primitive *primitive, Model *model,
|
|||||||
#else
|
#else
|
||||||
(void)model;
|
(void)model;
|
||||||
(void)warn;
|
(void)warn;
|
||||||
|
(void)strictness;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@ -5253,7 +5254,7 @@ static bool ParseMaterial(Material *material, std::string *err, std::string *war
|
|||||||
if (ParseNumberArrayProperty(&material->emissiveFactor, err, o,
|
if (ParseNumberArrayProperty(&material->emissiveFactor, err, o,
|
||||||
"emissiveFactor",
|
"emissiveFactor",
|
||||||
/* required */ false)) {
|
/* required */ false)) {
|
||||||
if (strictness==ParseStrictness::PERMISSIVE && material->emissiveFactor.size() == 4) {
|
if (strictness==ParseStrictness::Permissive && material->emissiveFactor.size() == 4) {
|
||||||
if (warn) {
|
if (warn) {
|
||||||
(*warn) +=
|
(*warn) +=
|
||||||
"Array length of `emissiveFactor` parameter in "
|
"Array length of `emissiveFactor` parameter in "
|
||||||
|
Loading…
x
Reference in New Issue
Block a user