video_core: Make use of ordered container contains() where applicable
With C++20, we can use the more concise contains() member function instead of comparing the result of the find() call with the end iterator.
This commit is contained in:
parent
5cd051eced
commit
09fa1d6a73
8 changed files with 13 additions and 16 deletions
|
@ -230,7 +230,7 @@ vk::Pipeline VKGraphicsPipeline::CreatePipeline(const RenderPassParams& renderpa
|
|||
if (!attribute.enabled) {
|
||||
continue;
|
||||
}
|
||||
if (input_attributes.find(static_cast<u32>(index)) == input_attributes.end()) {
|
||||
if (!input_attributes.contains(static_cast<u32>(index))) {
|
||||
// Skip attributes not used by the vertex shaders.
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -2125,8 +2125,7 @@ private:
|
|||
OpStore(z_pointer, depth);
|
||||
}
|
||||
if (stage == ShaderType::Fragment) {
|
||||
const auto SafeGetRegister = [&](u32 reg) {
|
||||
// TODO(Rodrigo): Replace with contains once C++20 releases
|
||||
const auto SafeGetRegister = [this](u32 reg) {
|
||||
if (const auto it = registers.find(reg); it != registers.end()) {
|
||||
return OpLoad(t_float, it->second);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue