diff --git a/Source/Core/Core/GeckoCode.cpp b/Source/Core/Core/GeckoCode.cpp index 45b176cbd2..be5ce914db 100644 --- a/Source/Core/Core/GeckoCode.cpp +++ b/Source/Core/Core/GeckoCode.cpp @@ -66,7 +66,7 @@ static std::vector s_active_codes; static std::vector s_synced_codes; static std::mutex s_active_codes_lock; -void SetActiveCodes(const std::vector& gcodes) +void SetActiveCodes(std::span gcodes) { std::lock_guard lk(s_active_codes_lock); @@ -89,7 +89,7 @@ void SetSyncedCodesAsActive() s_active_codes = s_synced_codes; } -void UpdateSyncedCodes(const std::vector& gcodes) +void UpdateSyncedCodes(std::span gcodes) { s_synced_codes.clear(); s_synced_codes.reserve(gcodes.size()); @@ -98,7 +98,7 @@ void UpdateSyncedCodes(const std::vector& gcodes) s_synced_codes.shrink_to_fit(); } -std::vector SetAndReturnActiveCodes(const std::vector& gcodes) +std::vector SetAndReturnActiveCodes(std::span gcodes) { std::lock_guard lk(s_active_codes_lock); diff --git a/Source/Core/Core/GeckoCode.h b/Source/Core/Core/GeckoCode.h index 6f2f8dff4a..fffb83303c 100644 --- a/Source/Core/Core/GeckoCode.h +++ b/Source/Core/Core/GeckoCode.h @@ -3,6 +3,7 @@ #pragma once +#include #include #include @@ -58,10 +59,10 @@ constexpr u32 HLE_TRAMPOLINE_ADDRESS = INSTALLER_END_ADDRESS - 4; // preserve the emulation performance. constexpr u32 MAGIC_GAMEID = 0xD01F1BAD; -void SetActiveCodes(const std::vector& gcodes); +void SetActiveCodes(std::span gcodes); void SetSyncedCodesAsActive(); -void UpdateSyncedCodes(const std::vector& gcodes); -std::vector SetAndReturnActiveCodes(const std::vector& gcodes); +void UpdateSyncedCodes(std::span gcodes); +std::vector SetAndReturnActiveCodes(std::span gcodes); void RunCodeHandler(); void Shutdown(); void DoState(PointerWrap&);