no need to pass all the references

This commit is contained in:
vision 2014-05-23 17:21:46 +08:00
parent 910099fbe5
commit 66a33e7d93
1 changed files with 2 additions and 1 deletions

View File

@ -144,7 +144,7 @@ void TextureCache::addImageAsync(const std::string &path, const std::function<vo
void TextureCache::unbindImageAsync(const std::string& filename) void TextureCache::unbindImageAsync(const std::string& filename)
{ {
std::string fullpath = FileUtils::getInstance()->fullPathForFilename(filename); std::string fullpath = FileUtils::getInstance()->fullPathForFilename(filename);
auto found = std::find_if(_imageInfoQueue->begin(), _imageInfoQueue->end(), [&](ImageInfo* ptr)->bool{ return ptr->asyncStruct->filename == fullpath; }); auto found = std::find_if(_imageInfoQueue->begin(), _imageInfoQueue->end(), [&fullpath](ImageInfo* ptr)->bool{ return ptr->asyncStruct->filename == fullpath; });
if (found != _imageInfoQueue->end()) if (found != _imageInfoQueue->end())
{ {
_imageInfoMutex.lock(); _imageInfoMutex.lock();
@ -163,6 +163,7 @@ void TextureCache::unbindAllImageAsync()
} }
} }
void TextureCache::loadImage() void TextureCache::loadImage()
{ {
AsyncStruct *asyncStruct = nullptr; AsyncStruct *asyncStruct = nullptr;