cast size_t to uint_64_t for rapidjson serialization

This commit is contained in:
Ivo van Dongen 2020-05-29 11:24:11 +03:00
parent f3bf6ee78e
commit 272a9dfa5f
No known key found for this signature in database
GPG Key ID: 15F95B93E80AD5DE

View File

@ -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,