mirror of https://github.com/axmolengine/axmol.git
no need to pass all the references
This commit is contained in:
parent
910099fbe5
commit
66a33e7d93
|
@ -144,7 +144,7 @@ void TextureCache::addImageAsync(const std::string &path, const std::function<vo
|
|||
void TextureCache::unbindImageAsync(const std::string& 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())
|
||||
{
|
||||
_imageInfoMutex.lock();
|
||||
|
@ -163,6 +163,7 @@ void TextureCache::unbindAllImageAsync()
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
void TextureCache::loadImage()
|
||||
{
|
||||
AsyncStruct *asyncStruct = nullptr;
|
||||
|
|
Loading…
Reference in New Issue