mirror of
https://github.com/syoyo/tinygltf.git
synced 2026-06-08 11:13:50 +00:00
Merge pull request #265 from ivovandongen/ivd_rapidjson_size_t
cast size_t to uint_64_t for rapidjson serialization
This commit is contained in:
@@ -6274,6 +6274,13 @@ static void SerializeNumberProperty(const std::string &key, T 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>
|
||||
static void SerializeNumberArrayProperty(const std::string &key,
|
||||
const std::vector<T> &value,
|
||||
|
||||
Reference in New Issue
Block a user