mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-02 13:01:27 +12:00
vk: Code improvements
This commit is contained in:
parent
a58efda3b2
commit
759e32745c
2 changed files with 2 additions and 6 deletions
|
@ -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<int>(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);
|
||||
|
|
|
@ -361,7 +361,7 @@ namespace vk
|
|||
{
|
||||
if (!set.m_device)
|
||||
{
|
||||
break;
|
||||
continue;
|
||||
}
|
||||
|
||||
set.create_descriptor_set_layout();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue