Buildfix, warning fixes

This commit is contained in:
Henrik Rydgård 2018-03-01 13:50:56 +01:00
parent ee752f5399
commit 1e940f4973
3 changed files with 4 additions and 4 deletions

View file

@ -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;
}

View file

@ -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;
}

View file

@ -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);
}