mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-06-01 07:52:37 +00:00
Modernize std::fill
with ranges
In DSPCore.cpp, there were two `std::fill` uses that could be simplified using `std::fill_n`. Due to their proximity with other `std::fill` algorithms being modernized with ranges, I chose to make these examples into the rare `std::ranges::fill_n`.
This commit is contained in:
parent
a7160c7b38
commit
9bd1dae41d
8 changed files with 20 additions and 20 deletions
|
@ -764,9 +764,9 @@ bool FramebufferManager::CreateReadbackFramebuffer()
|
|||
}
|
||||
|
||||
m_efb_color_cache.tiles.resize(total_tiles);
|
||||
std::fill(m_efb_color_cache.tiles.begin(), m_efb_color_cache.tiles.end(), EFBCacheTile{false, 0});
|
||||
std::ranges::fill(m_efb_color_cache.tiles, EFBCacheTile{false, 0});
|
||||
m_efb_depth_cache.tiles.resize(total_tiles);
|
||||
std::fill(m_efb_depth_cache.tiles.begin(), m_efb_depth_cache.tiles.end(), EFBCacheTile{false, 0});
|
||||
std::ranges::fill(m_efb_depth_cache.tiles, EFBCacheTile{false, 0});
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue