blob: 0ecdae51f142f42d3cab86c6451fbac348d45f0b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
#include "resource_manager.h"
#include <string>
#include <unordered_map>
using namespace crepe::api;
ResourceManager& ResourceManager::get_instance(){
static ResourceManager instance;
return instance;
}
ResourceManager::~ResourceManager(){
m_resources.clear();
}
void ResourceManager::Unload(const std::string& file_path){
if(m_resources.find(file_path) != m_resources.end()){
m_resources.erase(file_path);
}
}
|