From 809766a4391b7f7b30d65804ae22a0f3e0c8a1cc Mon Sep 17 00:00:00 2001 From: mitaclaw <140017135+mitaclaw@users.noreply.github.com> Date: Thu, 22 Aug 2024 19:26:08 -0700 Subject: [PATCH] Simplify `std::fill` with `std::array::fill` --- Source/Core/Common/Assembler/CaseInsensitiveDict.h | 2 +- Source/Core/InputCommon/GCAdapter.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Core/Common/Assembler/CaseInsensitiveDict.h b/Source/Core/Common/Assembler/CaseInsensitiveDict.h index 8f6acccc8f..5dffbb6335 100644 --- a/Source/Core/Common/Assembler/CaseInsensitiveDict.h +++ b/Source/Core/Common/Assembler/CaseInsensitiveDict.h @@ -47,7 +47,7 @@ private: std::array _conns; std::optional _val; - TrieEntry() { std::fill(_conns.begin(), _conns.end(), INVALID_CONN); } + TrieEntry() { _conns.fill(INVALID_CONN); } }; constexpr size_t IndexOf(char c) const diff --git a/Source/Core/InputCommon/GCAdapter.cpp b/Source/Core/InputCommon/GCAdapter.cpp index 01cfcd2f92..84b5022c99 100644 --- a/Source/Core/InputCommon/GCAdapter.cpp +++ b/Source/Core/InputCommon/GCAdapter.cpp @@ -915,7 +915,7 @@ static void ResetRumbleLockNeeded() return; } - std::fill(std::begin(s_controller_rumble), std::end(s_controller_rumble), 0); + s_controller_rumble.fill(0); std::array rumble = { 0x11, s_controller_rumble[0], s_controller_rumble[1], s_controller_rumble[2],