From 64ce6eb6bc74b0d0e75e870807d3d506339378bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Mocquillon?= Date: Mon, 6 Mar 2023 21:25:53 +0100 Subject: [PATCH] Merge the two identical conditions --- components/bsa/bsa_file.cpp | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/components/bsa/bsa_file.cpp b/components/bsa/bsa_file.cpp index 8fc2d3f8d9..b3e24c75ab 100644 --- a/components/bsa/bsa_file.cpp +++ b/components/bsa/bsa_file.cpp @@ -350,7 +350,7 @@ BsaVersion Bsa::BSAFile::detectVersion(const std::filesystem::path& filePath) return BSAVER_UNCOMPRESSED; } - if (head[0] == static_cast(BSAVER_COMPRESSED)) + if (head[0] == static_cast(BSAVER_COMPRESSED) || head[0] == ESM::fourCC("BTDX")) { if (head[1] == static_cast(0x01)) { @@ -363,17 +363,5 @@ BsaVersion Bsa::BSAFile::detectVersion(const std::filesystem::path& filePath) return BSAVER_COMPRESSED; } - if (head[0] == ESM::fourCC("BTDX")) - { - if (head[1] == static_cast(0x01)) - { - if (head[2] == ESM::fourCC("GNRL")) - return BSAVER_BA2_GNRL; - if (head[2] == ESM::fourCC("DX10")) - return BSAVER_BA2_DX10; - } - return BSAVER_COMPRESSED; - } - return BSAVER_UNKNOWN; }