mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-16 18:01:40 +00:00
Revert a const ref on update texture
if mod is a reference to a class member a variable swap breaks. We should find a way to keep this const ref if possible. Added a comment about this in header
This commit is contained in:
parent
113c85a66a
commit
4f4e2e3e83
2 changed files with 4 additions and 2 deletions
|
@ -1313,7 +1313,7 @@ void GenericCAO::updateTexturePos()
|
|||
}
|
||||
}
|
||||
|
||||
void GenericCAO::updateTextures(const std::string &mod)
|
||||
void GenericCAO::updateTextures(std::string mod)
|
||||
{
|
||||
ITextureSource *tsrc = m_client->tsrc();
|
||||
|
||||
|
|
|
@ -200,7 +200,9 @@ public:
|
|||
|
||||
void updateTexturePos();
|
||||
|
||||
void updateTextures(const std::string &mod);
|
||||
// std::string copy is mandatory as mod can be a class member and there is a swap
|
||||
// on those class members
|
||||
void updateTextures(std::string mod);
|
||||
|
||||
void updateAnimation();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue