Replace gsl::span for std::span (c++20) (#7531)

* Replace gsl::span for std::span (c++20)
* Replace gsl::byte with std::byte

Co-authored-by: Bevan Weiss <bevan.weiss@gmail.com>
This commit is contained in:
Ani 2021-05-30 15:10:46 +01:00 committed by GitHub
parent f5e529db61
commit a49446c9e9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
28 changed files with 82 additions and 87 deletions

View file

@ -15,11 +15,11 @@
#include "Loader/PSF.h"
#include "Utilities/StrUtil.h"
#include "Utilities/span.h"
#include "Utilities/date_time.h"
#include <mutex>
#include <algorithm>
#include <span>
#include "util/asm.hpp"
@ -1654,7 +1654,7 @@ static NEVER_INLINE error_code savedata_op(ppu_thread& ppu, u32 operation, u32 v
if (dotpos)
{
// Copy file name
gsl::span dst(name, dotpos + 1);
std::span dst(name, dotpos + 1);
strcpy_trunc(dst, file_path);
// Allow multiple '.' even though sysutil_check_name_string does not
@ -1691,7 +1691,7 @@ static NEVER_INLINE error_code savedata_op(ppu_thread& ppu, u32 operation, u32 v
if (file_path.size() > dotpos + 1)
{
// Copy file extension
gsl::span dst(name, file_path.size() - dotpos);
std::span dst(name, file_path.size() - dotpos);
strcpy_trunc(dst, file_path.operator std::string_view().substr(dotpos + 1));
// Allow '_' at start even though sysutil_check_name_string does not