Fix string_view constructor for macOS clang

Some versions of clang 14 (macOS+android) don't implement
`string_view(It first, It last)`, so let's use
`string_view(const CharT*, size_type)` instead.

Also remove unused header leftover from old code that uses std::string.
This commit is contained in:
Ian Chamberlain 2023-04-05 13:27:46 -04:00
parent 4cc181e5b8
commit 025913a734
No known key found for this signature in database
GPG Key ID: AE5484D09405AA60
2 changed files with 2 additions and 4 deletions

View File

@ -81,8 +81,8 @@ void SetHioRequest(const VAddr addr) {
if (current_hio_request.magic != std::array{'G', 'D', 'B', '\0'}) { if (current_hio_request.magic != std::array{'G', 'D', 'B', '\0'}) {
std::string_view bad_magic{ std::string_view bad_magic{
std::begin(current_hio_request.magic), current_hio_request.magic.data(),
std::end(current_hio_request.magic), current_hio_request.magic.size(),
}; };
LOG_WARNING(Debug_GDBStub, "Invalid HIO request sent by application: bad magic '{}'", LOG_WARNING(Debug_GDBStub, "Invalid HIO request sent by application: bad magic '{}'",
bad_magic); bad_magic);

View File

@ -4,8 +4,6 @@
#pragma once #pragma once
#include <string>
#include "common/common_types.h" #include "common/common_types.h"
namespace GDBStub { namespace GDBStub {