使用图片缓存机制防止重复加载同一图片

This commit is contained in:
Nomango 2017-10-01 14:51:51 +08:00
parent 1364a0a174
commit b825e17c6c
1 changed files with 2 additions and 4 deletions

View File

@ -228,9 +228,7 @@ CImage* GetCImage(tstring name, bool fromRes)
// 透明图片处理
CrossImage(cImage);
}
s_mCImages.insert(map<tstring, CImage>::value_type(name, cImage));
}
else
{
return &s_mCImages.at(name);
}
return &s_mCImages.at(name);
}