aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/api/resource_manager.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/crepe/api/resource_manager.h')
-rw-r--r--src/crepe/api/resource_manager.h12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/crepe/api/resource_manager.h b/src/crepe/api/resource_manager.h
index 5b0e0e1..a646d95 100644
--- a/src/crepe/api/resource_manager.h
+++ b/src/crepe/api/resource_manager.h
@@ -7,19 +7,17 @@
#include <unordered_map>
#include <utility>
+#include "api/baseResource.h"
-#include "Resource.h"
-#include "fabricator/resource_fabricator.h"
-
- namespace crepe::api{
+namespace crepe::api{
class ResourceManager{
private:
- std::unordered_map< std::string, std::unique_ptr<api::Resource>> m_resources;
+ std::unordered_map< std::string, std::unique_ptr<BaseResource>> m_resources;
protected:
@@ -44,10 +42,10 @@ public:
return static_cast<T*>(m_resources[file_path].get());
}
- std::unique_ptr<api::Resource> resource = ResourceFactory::create_resource<T>(file_path);
+ auto resource = std::make_unique<T>(file_path.c_str());
if (resource) {
m_resources[file_path] = std::move(resource);
- return static_cast<T*>(m_resources[file_path].get() );
+ return static_cast<T*>(m_resources[file_path].get() );
}
return nullptr;