mirror of
https://github.com/syoyo/tinygltf.git
synced 2026-06-08 11:13:50 +00:00
Use std::string instead of const char* for GetKey function
This commit is contained in:
@@ -3000,7 +3000,9 @@ json_const_iterator ObjectEnd(const json &o) {
|
||||
#endif
|
||||
}
|
||||
|
||||
const char *GetKey(json_const_iterator &it) {
|
||||
// Making this a const char* results in a pointer to a temporary when
|
||||
// TINYGLTF_USE_RAPIDJSON is off.
|
||||
std::string GetKey(json_const_iterator &it) {
|
||||
#ifdef TINYGLTF_USE_RAPIDJSON
|
||||
return it->name.GetString();
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user