mirror of
https://github.com/minetest/irrlicht.git
synced 2024-09-30 08:20:26 +02:00
Actually, maybe more functional approach is better
This commit is contained in:
parent
132f1ae5d6
commit
a8f67ace8e
|
@ -217,6 +217,7 @@ IAnimatedMesh* CB3DJSONMeshFileLoader::createMesh(io::IReadFile* file) {
|
||||||
output[file->getSize()] = '\0';
|
output[file->getSize()] = '\0';
|
||||||
|
|
||||||
// We have to catch a JSON parse error or else the game will segfault.
|
// We have to catch a JSON parse error or else the game will segfault.
|
||||||
|
json data;
|
||||||
try {
|
try {
|
||||||
data = json::parse(output);
|
data = json::parse(output);
|
||||||
} catch (const json::parse_error& e) {
|
} catch (const json::parse_error& e) {
|
||||||
|
|
|
@ -17,14 +17,6 @@ class CB3DJSONMeshFileLoader : public IMeshLoader
|
||||||
private:
|
private:
|
||||||
// Fields.
|
// Fields.
|
||||||
CSkinnedMesh* AnimatedMesh;
|
CSkinnedMesh* AnimatedMesh;
|
||||||
/*
|
|
||||||
Quick note about JSON.
|
|
||||||
This is static memory, it's a static memory address so I do not think
|
|
||||||
that this needs to be freed.
|
|
||||||
So once this model goes out of scope, I'm pretty sure that this will
|
|
||||||
be pointing to the next model. Or maybe the last model loaded.
|
|
||||||
*/
|
|
||||||
json data;
|
|
||||||
|
|
||||||
// Methods.
|
// Methods.
|
||||||
void cleanUp(std::string);
|
void cleanUp(std::string);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user