mirror of https://github.com/axmolengine/axmol.git
Const love: std::function<void(Texture2D*)> -> const
std::function<void(Texture2D*)>&
This commit is contained in:
parent
6feef5fa55
commit
5000873778
|
@ -93,7 +93,7 @@ std::string TextureCache::getDescription() const
|
||||||
return StringUtils::format("<TextureCache | Number of textures = %d>", static_cast<int>(_textures.size()));
|
return StringUtils::format("<TextureCache | Number of textures = %d>", static_cast<int>(_textures.size()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void TextureCache::addImageAsync(const std::string &path, std::function<void(Texture2D*)> callback)
|
void TextureCache::addImageAsync(const std::string &path, const std::function<void(Texture2D*)>& callback)
|
||||||
{
|
{
|
||||||
Texture2D *texture = nullptr;
|
Texture2D *texture = nullptr;
|
||||||
|
|
||||||
|
|
|
@ -117,7 +117,7 @@ public:
|
||||||
* Supported image extensions: .png, .jpg
|
* Supported image extensions: .png, .jpg
|
||||||
* @since v0.8
|
* @since v0.8
|
||||||
*/
|
*/
|
||||||
virtual void addImageAsync(const std::string &filepath, std::function<void(Texture2D*)> callback);
|
virtual void addImageAsync(const std::string &filepath, const std::function<void(Texture2D*)>& callback);
|
||||||
|
|
||||||
/** Returns a Texture2D object given an Image.
|
/** Returns a Texture2D object given an Image.
|
||||||
* If the image was not previously loaded, it will create a new Texture2D object and it will return it.
|
* If the image was not previously loaded, it will create a new Texture2D object and it will return it.
|
||||||
|
|
Loading…
Reference in New Issue