mirror of https://github.com/PCSX2/pcsx2.git
GSTextureCache: Refactor code to avoid using local shared pointer.
This commit is contained in:
parent
894ce5b7d6
commit
c183368d72
|
@ -2036,11 +2036,8 @@ void GSTextureCache::SourceMap::RemoveAt(Source* s)
|
||||||
|
|
||||||
void GSTextureCache::AttachPaletteToSource(Source* s, uint16 pal, bool need_gs_texture)
|
void GSTextureCache::AttachPaletteToSource(Source* s, uint16 pal, bool need_gs_texture)
|
||||||
{
|
{
|
||||||
std::shared_ptr<Palette> p = m_palette_map.LookupPalette(pal, need_gs_texture);
|
s->m_palette_obj = m_palette_map.LookupPalette(pal, need_gs_texture);
|
||||||
s->m_palette_obj = p;
|
s->m_palette = need_gs_texture ? s->m_palette_obj->GetPaletteGSTexture() : nullptr;
|
||||||
if (need_gs_texture) {
|
|
||||||
s->m_palette = p->GetPaletteGSTexture();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// GSTextureCache::Palette
|
// GSTextureCache::Palette
|
||||||
|
|
Loading…
Reference in New Issue