mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Buildfix, warning fixes
This commit is contained in:
parent
ee752f5399
commit
1e940f4973
3 changed files with 4 additions and 4 deletions
|
@ -86,7 +86,7 @@ bool VulkanTexture::CreateDirect(VkCommandBuffer cmd, int w, int h, int numMips,
|
|||
_assert_msg_(G3D, res != VK_ERROR_TOO_MANY_OBJECTS, "Too many Vulkan memory objects!");
|
||||
_assert_(res == VK_ERROR_OUT_OF_HOST_MEMORY || res == VK_ERROR_OUT_OF_DEVICE_MEMORY || res == VK_ERROR_TOO_MANY_OBJECTS);
|
||||
vkDestroyImage(vulkan_->GetDevice(), image_, nullptr);
|
||||
image_ = nullptr;
|
||||
image_ = VK_NULL_HANDLE;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -80,7 +80,7 @@ void AsyncImageFileView::SetFilename(std::string filename) {
|
|||
void AsyncImageFileView::Draw(UIContext &dc) {
|
||||
using namespace Draw;
|
||||
if (!texture_ && !textureFailed_ && !filename_.empty()) {
|
||||
texture_ = std::move(CreateTextureFromFile(dc.GetDrawContext(), filename_.c_str(), DETECT, true));
|
||||
texture_ = CreateTextureFromFile(dc.GetDrawContext(), filename_.c_str(), DETECT, true);
|
||||
if (!texture_.get())
|
||||
textureFailed_ = true;
|
||||
}
|
||||
|
|
|
@ -161,7 +161,7 @@ std::unique_ptr<ManagedTexture> CreateTextureFromFile(Draw::DrawContext *draw, c
|
|||
delete mtex;
|
||||
return std::unique_ptr<ManagedTexture>();
|
||||
}
|
||||
return std::move(std::unique_ptr<ManagedTexture>(mtex));
|
||||
return std::unique_ptr<ManagedTexture>(mtex);
|
||||
}
|
||||
|
||||
// TODO: Remove the code duplication between this and LoadFromFileData
|
||||
|
@ -170,5 +170,5 @@ std::unique_ptr<ManagedTexture> CreateTextureFromFileData(Draw::DrawContext *dra
|
|||
return std::unique_ptr<ManagedTexture>();
|
||||
ManagedTexture *mtex = new ManagedTexture(draw);
|
||||
mtex->LoadFromFileData(data, size, type, generateMips);
|
||||
return std::move(std::unique_ptr<ManagedTexture>(mtex));
|
||||
return std::unique_ptr<ManagedTexture>(mtex);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue