From 272a9dfa5fb4da221ac019e7ff99566a07557e3e Mon Sep 17 00:00:00 2001 From: Ivo van Dongen Date: Fri, 29 May 2020 11:24:11 +0300 Subject: [PATCH] cast size_t to uint_64_t for rapidjson serialization --- tiny_gltf.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tiny_gltf.h b/tiny_gltf.h index 49c313b..b8b6c9a 100644 --- a/tiny_gltf.h +++ b/tiny_gltf.h @@ -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(number))); +} +#endif + template static void SerializeNumberArrayProperty(const std::string &key, const std::vector &value,