From 09fa1d6a739b18f6a8f3d83065ff9aebd6e4bc8d Mon Sep 17 00:00:00 2001 From: Lioncash Date: Mon, 7 Dec 2020 16:30:36 -0500 Subject: 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. --- src/video_core/shader/decode.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/video_core/shader/decode.cpp') diff --git a/src/video_core/shader/decode.cpp b/src/video_core/shader/decode.cpp index c8f4da6df..ab14c1aa3 100644 --- a/src/video_core/shader/decode.cpp +++ b/src/video_core/shader/decode.cpp @@ -153,8 +153,8 @@ void ShaderIR::Decode() { const auto& blocks = shader_info.blocks; NodeBlock current_block; u32 current_label = static_cast(exit_branch); - for (auto& block : blocks) { - if (shader_info.labels.count(block.start) != 0) { + for (const auto& block : blocks) { + if (shader_info.labels.contains(block.start)) { insert_block(current_block, current_label); current_block.clear(); current_label = block.start; -- cgit v1.2.3