mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-06-12 13:43:15 +00:00
Fixed return strict const iterator, replace to range-based loop C++17 and code refactor (#548)
Signed-off-by: Herman Semenov <GermanAizek@yandex.ru> Co-authored-by: georgemoralis <giorgosmrls@gmail.com>
This commit is contained in:
parent
9814a1b788
commit
96ea686eb6
8 changed files with 31 additions and 32 deletions
|
@ -43,11 +43,10 @@ struct RangeSet {
|
|||
if (m_ranges_set.empty()) {
|
||||
return;
|
||||
}
|
||||
auto it = m_ranges_set.begin();
|
||||
auto end_it = m_ranges_set.end();
|
||||
for (; it != end_it; it++) {
|
||||
const VAddr inter_addr_end = it->upper();
|
||||
const VAddr inter_addr = it->lower();
|
||||
|
||||
for (const auto& set : m_ranges_set) {
|
||||
const VAddr inter_addr_end = set.upper();
|
||||
const VAddr inter_addr = set.lower();
|
||||
func(inter_addr, inter_addr_end);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -70,7 +70,7 @@ public:
|
|||
bool IsVideoOutSurface(const AmdGpu::Liverpool::ColorBuffer& color_buffer) {
|
||||
return std::ranges::find_if(vo_buffers_addr, [&](VAddr vo_buffer) {
|
||||
return vo_buffer == color_buffer.Address();
|
||||
}) != vo_buffers_addr.end();
|
||||
}) != vo_buffers_addr.cend();
|
||||
}
|
||||
|
||||
bool ShowSplash(Frame* frame = nullptr);
|
||||
|
|
|
@ -47,7 +47,7 @@ void Swapchain::Create(u32 width_, u32 height_, vk::SurfaceKHR surface_) {
|
|||
std::find_if(modes.begin(), modes.end(),
|
||||
[&requested](vk::PresentModeKHR mode) { return mode == requested; });
|
||||
|
||||
return it != modes.end();
|
||||
return it != modes.cend();
|
||||
};
|
||||
const bool has_mailbox = find_mode(vk::PresentModeKHR::eMailbox);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue