diff --git a/modules/ugdk-core/include/ugdk/action/json2spriteanimation.h b/modules/ugdk-core/include/ugdk/action/json2spriteanimation.h index 4c996996..cfe09421 100644 --- a/modules/ugdk-core/include/ugdk/action/json2spriteanimation.h +++ b/modules/ugdk-core/include/ugdk/action/json2spriteanimation.h @@ -16,7 +16,7 @@ namespace action { using SpriteAnimationTable = ::ugdk::structure::IndexableTable; -std::shared_ptr LoadSpriteAnimationTableFromFile(const std::string& filepath); +const SpriteAnimationTable* LoadSpriteAnimationTableFromFile(const std::string& filepath); } // namespace action } // namespace ugdk diff --git a/modules/ugdk-core/src/action/json2spriteanimation.cc b/modules/ugdk-core/src/action/json2spriteanimation.cc index 8f8efd06..6fa23e2f 100644 --- a/modules/ugdk-core/src/action/json2spriteanimation.cc +++ b/modules/ugdk-core/src/action/json2spriteanimation.cc @@ -71,7 +71,7 @@ namespace { }; } -std::shared_ptr LoadSpriteAnimationTableFromFile(const std::string& filepath) { +const SpriteAnimationTable* LoadSpriteAnimationTableFromFile(const std::string& filepath) { auto file = filesystem::manager().OpenFile(filepath); if (!file) return nullptr; @@ -81,7 +81,7 @@ std::shared_ptr LoadSpriteAnimationTableFromFile(con throw system::BaseException("Invalid json: %s\n", filepath.c_str()); auto json_node = libjson::parse(contents); - std::shared_ptr table(new SpriteAnimationTable(json_node.size())); + SpriteAnimationTable* table(new SpriteAnimationTable(json_node.size())); for (const auto& animation_json : json_node) { auto element = MakeUnique(); @@ -108,4 +108,3 @@ std::shared_ptr LoadSpriteAnimationTableFromFile(con } // namespace action } // namespace ugdk -