mirror of
https://git.mirrors.martin98.com/https://github.com/syoyo/tinygltf.git
synced 2025-08-15 22:05:52 +08:00
Removing warnings
This commit is contained in:
parent
ce7fa7419b
commit
0d2b6efa6f
12
tiny_gltf.h
12
tiny_gltf.h
@ -882,7 +882,7 @@ struct Accessor {
|
|||||||
return static_cast<int>(bufferViewObject.byteStride);
|
return static_cast<int>(bufferViewObject.byteStride);
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
//unreachable return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
Accessor() {
|
Accessor() {
|
||||||
@ -3090,7 +3090,7 @@ static bool ParseBooleanProperty(bool *ret, std::string *err, const json &o,
|
|||||||
auto& value = GetValue(it);
|
auto& value = GetValue(it);
|
||||||
|
|
||||||
bool isBoolean;
|
bool isBoolean;
|
||||||
bool boolValue;
|
bool boolValue = false;
|
||||||
#ifdef TINYGLTF_USE_RAPIDJSON
|
#ifdef TINYGLTF_USE_RAPIDJSON
|
||||||
isBoolean = value.IsBool();
|
isBoolean = value.IsBool();
|
||||||
if (isBoolean)
|
if (isBoolean)
|
||||||
@ -3176,7 +3176,7 @@ static bool ParseUnsignedProperty(size_t *ret, std::string *err, const json &o,
|
|||||||
|
|
||||||
auto& value = GetValue(it);
|
auto& value = GetValue(it);
|
||||||
|
|
||||||
size_t uValue;
|
size_t uValue = 0;
|
||||||
bool isUValue;
|
bool isUValue;
|
||||||
#ifdef TINYGLTF_USE_RAPIDJSON
|
#ifdef TINYGLTF_USE_RAPIDJSON
|
||||||
isUValue = false;
|
isUValue = false;
|
||||||
@ -5031,9 +5031,9 @@ bool TinyGLTF::LoadFromString(Model *model, std::string *err, std::string *warn,
|
|||||||
auto ForEachInArray = [](const json& v, const char* member, const std::function<bool(const json&)>& cb)->bool
|
auto ForEachInArray = [](const json& v, const char* member, const std::function<bool(const json&)>& cb)->bool
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
json_const_iterator it;
|
json_const_iterator itm;
|
||||||
if (FindMember(v, member, it) && IsArray(GetValue(it))) {
|
if (FindMember(v, member, itm) && IsArray(GetValue(itm))) {
|
||||||
const json &root = GetValue(it);
|
const json &root = GetValue(itm);
|
||||||
auto it = ArrayBegin(root);
|
auto it = ArrayBegin(root);
|
||||||
auto end = ArrayEnd(root);
|
auto end = ArrayEnd(root);
|
||||||
for (; it != end; ++it) {
|
for (; it != end; ++it) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user