mirror of
https://git.mirrors.martin98.com/https://github.com/syoyo/tinygltf.git
synced 2025-07-03 18:45:13 +08:00
cast size_t to uint_64_t for rapidjson serialization
This commit is contained in:
parent
f3bf6ee78e
commit
272a9dfa5f
@ -6274,6 +6274,13 @@ static void SerializeNumberProperty(const std::string &key, T number,
|
|||||||
JsonAddMember(obj, key.c_str(), json(number));
|
JsonAddMember(obj, key.c_str(), json(number));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef TINYGLTF_USE_RAPIDJSON
|
||||||
|
template <>
|
||||||
|
void SerializeNumberProperty(const std::string &key, size_t number, json &obj) {
|
||||||
|
JsonAddMember(obj, key.c_str(), json(static_cast<uint64_t>(number)));
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
static void SerializeNumberArrayProperty(const std::string &key,
|
static void SerializeNumberArrayProperty(const std::string &key,
|
||||||
const std::vector<T> &value,
|
const std::vector<T> &value,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user