diff --git a/Source/Core/Core/ActionReplay.cpp b/Source/Core/Core/ActionReplay.cpp index 31e0c6766e..c702748003 100644 --- a/Source/Core/Core/ActionReplay.cpp +++ b/Source/Core/Core/ActionReplay.cpp @@ -112,7 +112,7 @@ struct ARAddr // ---------------------- // AR Remote Functions -void ApplyCodes(const std::vector& codes) +void ApplyCodes(std::span codes) { if (!Config::Get(Config::MAIN_ENABLE_CHEATS)) return; @@ -132,7 +132,7 @@ void SetSyncedCodesAsActive() s_active_codes = s_synced_codes; } -void UpdateSyncedCodes(const std::vector& codes) +void UpdateSyncedCodes(std::span codes) { s_synced_codes.clear(); s_synced_codes.reserve(codes.size()); @@ -141,7 +141,7 @@ void UpdateSyncedCodes(const std::vector& codes) s_synced_codes.shrink_to_fit(); } -std::vector ApplyAndReturnCodes(const std::vector& codes) +std::vector ApplyAndReturnCodes(std::span codes) { if (Config::Get(Config::MAIN_ENABLE_CHEATS)) { @@ -250,7 +250,7 @@ std::vector LoadCodes(const IniFile& global_ini, const IniFile& local_in return codes; } -void SaveCodes(IniFile* local_ini, const std::vector& codes) +void SaveCodes(IniFile* local_ini, std::span codes) { std::vector lines; std::vector enabled_lines; diff --git a/Source/Core/Core/ActionReplay.h b/Source/Core/Core/ActionReplay.h index 13b6294d30..1c7fb61fa9 100644 --- a/Source/Core/Core/ActionReplay.h +++ b/Source/Core/Core/ActionReplay.h @@ -3,8 +3,8 @@ #pragma once +#include #include -#include #include #include @@ -37,15 +37,15 @@ struct ARCode void RunAllActive(); -void ApplyCodes(const std::vector& codes); +void ApplyCodes(std::span codes); void SetSyncedCodesAsActive(); -void UpdateSyncedCodes(const std::vector& codes); -std::vector ApplyAndReturnCodes(const std::vector& codes); +void UpdateSyncedCodes(std::span codes); +std::vector ApplyAndReturnCodes(std::span codes); void AddCode(ARCode new_code); void LoadAndApplyCodes(const IniFile& global_ini, const IniFile& local_ini); std::vector LoadCodes(const IniFile& global_ini, const IniFile& local_ini); -void SaveCodes(IniFile* local_ini, const std::vector& codes); +void SaveCodes(IniFile* local_ini, std::span codes); using EncryptedLine = std::string; std::variant DeserializeLine(const std::string& line);