From 27a2dd4fce2d529cd1d96aa5ddce1e74b4f54a2f Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 7 Apr 2017 02:48:12 +0300 Subject: Move resourcemanager from class to namespace. --- src/resources/atlas/atlasmanager.cpp | 16 ++++++++-------- src/resources/atlas/atlasresource.cpp | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'src/resources/atlas') diff --git a/src/resources/atlas/atlasmanager.cpp b/src/resources/atlas/atlasmanager.cpp index b9107a757..91749e597 100644 --- a/src/resources/atlas/atlasmanager.cpp +++ b/src/resources/atlas/atlasmanager.cpp @@ -132,12 +132,12 @@ void AtlasManager::loadImages(const StringVect &files, const std::string str = *it; // check is image with same name already in cache // and if yes, move it to deleted set - Resource *const res = resourceManager->getTempResource(str); + Resource *const res = ResourceManager::getTempResource(str); if (res) { // increase counter because in moveToDeleted it will be decreased. res->incRef(); - resourceManager->moveToDeleted(res); + ResourceManager::moveToDeleted(res); } std::string path = str; @@ -181,12 +181,12 @@ void AtlasManager::loadEmptyImages(const StringVect &files, const std::string str = *it; // check is image with same name already in cache // and if yes, move it to deleted set - Resource *const res = resourceManager->getTempResource(str); + Resource *const res = ResourceManager::getTempResource(str); if (res) { // increase counter because in moveToDeleted it will be decreased. res->incRef(); - resourceManager->moveToDeleted(res); + ResourceManager::moveToDeleted(res); } Image *const image = new Image(0, @@ -395,14 +395,14 @@ void AtlasManager::injectToResources(const AtlasResource *const resource) { Image *const image = atlas->atlasImage; if (image) - resourceManager->addResource(atlas->name, image); + ResourceManager::addResource(atlas->name, image); FOR_EACH (std::vector::iterator, it2, atlas->items) { AtlasItem *const item = *it2; if (!item) continue; // add each atlas sub image to resources - resourceManager->addResource(item->name, item->image); + ResourceManager::addResource(item->name, item->image); } } } @@ -422,7 +422,7 @@ void AtlasManager::moveToDeleted(AtlasResource *const resource) if (image) { // move each atlas image to deleted - resourceManager->moveToDeleted(image); + ResourceManager::moveToDeleted(image); } FOR_EACH (std::vector::iterator, it2, atlas->items) { @@ -433,7 +433,7 @@ void AtlasManager::moveToDeleted(AtlasResource *const resource) if (image2) { // move each atlas sub image to deleted - resourceManager->moveToDeleted(image2); + ResourceManager::moveToDeleted(image2); } } } diff --git a/src/resources/atlas/atlasresource.cpp b/src/resources/atlas/atlasresource.cpp index 5f2a3d3c7..06ae62542 100644 --- a/src/resources/atlas/atlasresource.cpp +++ b/src/resources/atlas/atlasresource.cpp @@ -53,7 +53,7 @@ AtlasResource::~AtlasResource() delete atlas; } } - resourceManager->clearDeleted(false); + ResourceManager::clearDeleted(false); } void AtlasResource::incRef() -- cgit v1.2.3-60-g2f50