mirror of
https://github.com/SFML/SFML.git
synced 2024-11-24 20:31:05 +08:00
Fix inconsistencies in sf::Texture
move and swap
This commit is contained in:
parent
52ce862a00
commit
8acb9d9ab1
@ -117,7 +117,9 @@ m_texture(std::exchange(right.m_texture, 0)),
|
|||||||
m_isSmooth(std::exchange(right.m_isSmooth, false)),
|
m_isSmooth(std::exchange(right.m_isSmooth, false)),
|
||||||
m_sRgb(std::exchange(right.m_sRgb, false)),
|
m_sRgb(std::exchange(right.m_sRgb, false)),
|
||||||
m_isRepeated(std::exchange(right.m_isRepeated, false)),
|
m_isRepeated(std::exchange(right.m_isRepeated, false)),
|
||||||
|
m_pixelsFlipped(std::exchange(right.m_pixelsFlipped, false)),
|
||||||
m_fboAttachment(std::exchange(right.m_fboAttachment, false)),
|
m_fboAttachment(std::exchange(right.m_fboAttachment, false)),
|
||||||
|
m_hasMipmap(std::exchange(right.m_hasMipmap, false)),
|
||||||
m_cacheId(std::exchange(right.m_cacheId, 0))
|
m_cacheId(std::exchange(right.m_cacheId, 0))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@ -147,7 +149,9 @@ Texture& Texture::operator=(Texture&& right) noexcept
|
|||||||
m_isSmooth = std::exchange(right.m_isSmooth, false);
|
m_isSmooth = std::exchange(right.m_isSmooth, false);
|
||||||
m_sRgb = std::exchange(right.m_sRgb, false);
|
m_sRgb = std::exchange(right.m_sRgb, false);
|
||||||
m_isRepeated = std::exchange(right.m_isRepeated, false);
|
m_isRepeated = std::exchange(right.m_isRepeated, false);
|
||||||
|
m_pixelsFlipped = std::exchange(right.m_pixelsFlipped, false);
|
||||||
m_fboAttachment = std::exchange(right.m_fboAttachment, false);
|
m_fboAttachment = std::exchange(right.m_fboAttachment, false);
|
||||||
|
m_hasMipmap = std::exchange(right.m_hasMipmap, false);
|
||||||
m_cacheId = std::exchange(right.m_cacheId, 0);
|
m_cacheId = std::exchange(right.m_cacheId, 0);
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
@ -947,9 +951,7 @@ void Texture::swap(Texture& right) noexcept
|
|||||||
std::swap(m_pixelsFlipped, right.m_pixelsFlipped);
|
std::swap(m_pixelsFlipped, right.m_pixelsFlipped);
|
||||||
std::swap(m_fboAttachment, right.m_fboAttachment);
|
std::swap(m_fboAttachment, right.m_fboAttachment);
|
||||||
std::swap(m_hasMipmap, right.m_hasMipmap);
|
std::swap(m_hasMipmap, right.m_hasMipmap);
|
||||||
|
std::swap(m_cacheId, right.m_cacheId);
|
||||||
m_cacheId = TextureImpl::getUniqueId();
|
|
||||||
right.m_cacheId = TextureImpl::getUniqueId();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user