From cdc78f81f761b43e4baafd3f368893d13f598959 Mon Sep 17 00:00:00 2001 From: kd-11 Date: Sun, 22 Jun 2025 14:43:38 +0300 Subject: [PATCH] vk: Code improvements --- rpcs3/Emu/RSX/VK/VKCommonDecompiler.cpp | 6 +----- rpcs3/Emu/RSX/VK/VKProgramPipeline.cpp | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/rpcs3/Emu/RSX/VK/VKCommonDecompiler.cpp b/rpcs3/Emu/RSX/VK/VKCommonDecompiler.cpp index 790421e474..815492caa3 100644 --- a/rpcs3/Emu/RSX/VK/VKCommonDecompiler.cpp +++ b/rpcs3/Emu/RSX/VK/VKCommonDecompiler.cpp @@ -43,22 +43,18 @@ namespace vk fmt::throw_exception("Invalid texture name: '%s'", name); } -#define IS_DIGIT(x) (x >= '0' && x <= '9') - constexpr int max_index_length = 2; const int name_length = static_cast(name.length()); std::string index; for (int char_idx = name_length - max_index_length; char_idx < name_length; ++char_idx) { - if (IS_DIGIT(name[char_idx])) + if (std::isdigit(name[char_idx])) { index += name[char_idx]; } } -#undef IS_DIGIT - if (index.empty()) { fmt::throw_exception("Invalid texture name: '%s'", name); diff --git a/rpcs3/Emu/RSX/VK/VKProgramPipeline.cpp b/rpcs3/Emu/RSX/VK/VKProgramPipeline.cpp index 85454481a2..967828655e 100644 --- a/rpcs3/Emu/RSX/VK/VKProgramPipeline.cpp +++ b/rpcs3/Emu/RSX/VK/VKProgramPipeline.cpp @@ -361,7 +361,7 @@ namespace vk { if (!set.m_device) { - break; + continue; } set.create_descriptor_set_layout();