summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/ControllerInterface
diff options
context:
space:
mode:
authormitaclaw <140017135+mitaclaw@users.noreply.github.com>2024-08-22 19:16:36 -0700
committermitaclaw <140017135+mitaclaw@users.noreply.github.com>2024-10-10 00:53:48 -0700
commit9bd1dae41d8703e70196397722f98364bae63035 (patch)
treea715dfc369fcefd8d57f51c090658305cc0eff3e /Source/Core/InputCommon/ControllerInterface
parenta7160c7b38a59d3a51f4a2d64621515fc5a1cab5 (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/InputCommon/ControllerInterface')
-rw-r--r--Source/Core/InputCommon/ControllerInterface/DInput/DInputJoystick.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/Core/InputCommon/ControllerInterface/DInput/DInputJoystick.cpp b/Source/Core/InputCommon/ControllerInterface/DInput/DInputJoystick.cpp
index 5d3e353a0a..a78c310f24 100644
--- a/Source/Core/InputCommon/ControllerInterface/DInput/DInputJoystick.cpp
+++ b/Source/Core/InputCommon/ControllerInterface/DInput/DInputJoystick.cpp
@@ -183,7 +183,7 @@ Joystick::Joystick(const LPDIRECTINPUTDEVICE8 device) : m_device(device)
// Set hats to center:
// "The center position is normally reported as -1" -MSDN
- std::fill(std::begin(m_state_in.rgdwPOV), std::end(m_state_in.rgdwPOV), -1);
+ std::ranges::fill(m_state_in.rgdwPOV, -1);
}
Joystick::~Joystick()