mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 16:40:05 +00:00
Don't use std::move when returning a local variable, allow NRVO
This commit is contained in:
parent
d73c1597d2
commit
976617d342
2 changed files with 4 additions and 4 deletions
|
|
@ -260,7 +260,7 @@ TextureAtlas::Impl::LoadImage(const std::string& imagePath)
|
|||
if (!imageFile.isOpen())
|
||||
{
|
||||
logger_->error("Could not open image: {}", imagePath);
|
||||
return std::move(image);
|
||||
return image;
|
||||
}
|
||||
|
||||
boost::iostreams::stream<util::IoDeviceSource> dataStream(imageFile);
|
||||
|
|
@ -275,10 +275,10 @@ TextureAtlas::Impl::LoadImage(const std::string& imagePath)
|
|||
catch (const std::exception& ex)
|
||||
{
|
||||
logger_->error("Error reading image: {}", ex.what());
|
||||
return std::move(image);
|
||||
return image;
|
||||
}
|
||||
|
||||
return std::move(image);
|
||||
return image;
|
||||
}
|
||||
|
||||
TextureAtlas& TextureAtlas::Instance()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue