mirror of
https://github.com/PabloMK7/citra.git
synced 2025-10-11 20:10:03 +00:00
code: Use std::span where appropriate (#6658)
* code: Use std::span when possible * code: Prefix memcpy and memcmp with std::
This commit is contained in:
parent
4ccd9f24fb
commit
cf9bb90ae3
106 changed files with 362 additions and 329 deletions
|
@ -2,6 +2,7 @@
|
|||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include <span>
|
||||
#include <vector>
|
||||
#include "common/archives.h"
|
||||
#include "common/bit_field.h"
|
||||
|
@ -142,7 +143,7 @@ static void WriteSingleHWReg(u32 base_address, u32 data) {
|
|||
* @param data A vector containing the source data
|
||||
* @return RESULT_SUCCESS if the parameters are valid, error code otherwise
|
||||
*/
|
||||
static ResultCode WriteHWRegs(u32 base_address, u32 size_in_bytes, const std::vector<u8>& data) {
|
||||
static ResultCode WriteHWRegs(u32 base_address, u32 size_in_bytes, std::span<const u8> data) {
|
||||
// This magic number is verified to be done by the gsp module
|
||||
const u32 max_size_in_bytes = 0x80;
|
||||
|
||||
|
@ -185,8 +186,8 @@ static ResultCode WriteHWRegs(u32 base_address, u32 size_in_bytes, const std::ve
|
|||
* @param masks A vector containing the masks
|
||||
* @return RESULT_SUCCESS if the parameters are valid, error code otherwise
|
||||
*/
|
||||
static ResultCode WriteHWRegsWithMask(u32 base_address, u32 size_in_bytes,
|
||||
const std::vector<u8>& data, const std::vector<u8>& masks) {
|
||||
static ResultCode WriteHWRegsWithMask(u32 base_address, u32 size_in_bytes, std::span<const u8> data,
|
||||
std::span<const u8> masks) {
|
||||
// This magic number is verified to be done by the gsp module
|
||||
const u32 max_size_in_bytes = 0x80;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue