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:
parent
4cc181e5b8
commit
025913a734
|
@ -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);
|
||||||
|
|
|
@ -4,8 +4,6 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <string>
|
|
||||||
|
|
||||||
#include "common/common_types.h"
|
#include "common/common_types.h"
|
||||||
|
|
||||||
namespace GDBStub {
|
namespace GDBStub {
|
||||||
|
|
Reference in New Issue