From f30a8b3a9860bcb29a0f8a00cbeb718de9e626d4 Mon Sep 17 00:00:00 2001 From: MistEO Date: Wed, 11 Jan 2023 20:25:13 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E4=BC=98=E5=8C=96=E4=B8=80=E4=B8=AA?= =?UTF-8?q?=E6=B2=A1=E5=95=A5=E7=94=A8=E7=9A=84=E5=8A=A0=E8=BD=BD=E9=80=BB?= =?UTF-8?q?=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/MaaCore/Config/ResourceLoader.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/MaaCore/Config/ResourceLoader.cpp b/src/MaaCore/Config/ResourceLoader.cpp index bcdfda2352..d7b82f18d2 100644 --- a/src/MaaCore/Config/ResourceLoader.cpp +++ b/src/MaaCore/Config/ResourceLoader.cpp @@ -85,13 +85,8 @@ bool asst::ResourceLoader::load(const std::filesystem::path& path) #undef LoadTemplByConfigAndCheckRet #undef LoadResourceAndCheckRet - if (!config_future.get() || !tile_future.get() || !ocr_future.get() || !ocr_char_future.get()) { - m_loaded = false; - return false; - } - - m_loaded = true; - return true; + m_loaded = config_future.get() && tile_future.get() && ocr_future.get() && ocr_char_future.get(); + return m_loaded; } bool asst::ResourceLoader::loaded() const noexcept