VK: ReSharper warning fixes

This commit is contained in:
Megamouse 2021-04-11 16:51:57 +02:00
parent a50be7a912
commit 1f295bba5b
14 changed files with 27 additions and 50 deletions

View file

@ -149,15 +149,13 @@ namespace vk
return *this;
}
bool program::has_uniform(program_input_type type, const std::string &uniform_name)
bool program::has_uniform(program_input_type type, const std::string& uniform_name)
{
for (const auto &uniform : uniforms[type])
const auto& uniform = uniforms[type];
return std::any_of(uniform.cbegin(), uniform.cend(), [&uniform_name](const auto& u)
{
if (uniform.name == uniform_name)
return true;
}
return false;
return u.name == uniform_name;
});
}
void program::bind_uniform(const VkDescriptorImageInfo &image_descriptor, const std::string& uniform_name, VkDescriptorType type, VkDescriptorSet &descriptor_set)