[Core/HLE/Common/UI] Using C++17 make smart pointers

This commit is contained in:
Herman Semenov
2024-04-01 18:12:27 +03:00
parent 83bd9fd665
commit cfb77ce83e
3 changed files with 15 additions and 15 deletions
+1 -1
View File
@@ -79,7 +79,7 @@ void AsyncImageFileView::DeviceRestored(Draw::DrawContext *draw) {
void AsyncImageFileView::Draw(UIContext &dc) {
using namespace Draw;
if (!texture_ && !textureFailed_ && !filename_.empty()) {
texture_ = std::unique_ptr<ManagedTexture>(new ManagedTexture(dc.GetDrawContext(), filename_.c_str(), ImageFileType::DETECT, true));
texture_ = std::make_unique<ManagedTexture>(dc.GetDrawContext(), filename_.c_str(), ImageFileType::DETECT, true);
if (!texture_.get())
textureFailed_ = true;
}