diff options
| author | mitaclaw <140017135+mitaclaw@users.noreply.github.com> | 2024-08-22 19:16:36 -0700 |
|---|---|---|
| committer | mitaclaw <140017135+mitaclaw@users.noreply.github.com> | 2024-10-10 00:53:48 -0700 |
| commit | 9bd1dae41d8703e70196397722f98364bae63035 (patch) | |
| tree | a715dfc369fcefd8d57f51c090658305cc0eff3e /Source/Core/VideoCommon/FramebufferManager.cpp | |
| parent | a7160c7b38a59d3a51f4a2d64621515fc5a1cab5 (diff) | |
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`.
Diffstat (limited to 'Source/Core/VideoCommon/FramebufferManager.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/FramebufferManager.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/Core/VideoCommon/FramebufferManager.cpp b/Source/Core/VideoCommon/FramebufferManager.cpp index 3c83bce2c4..044b94a5de 100644 --- a/Source/Core/VideoCommon/FramebufferManager.cpp +++ b/Source/Core/VideoCommon/FramebufferManager.cpp @@ -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; } |
