Fix functions which used Common::ArrayToString

This commit is contained in:
fearlessTobi 2018-11-18 00:51:14 +01:00
parent 41376cfa26
commit fc51a6fd08
2 changed files with 15 additions and 8 deletions

View File

@ -165,8 +165,10 @@ void ExtraHID::OnDisconnect() {
void ExtraHID::HandleConfigureHIDPollingRequest(const std::vector<u8>& request) { void ExtraHID::HandleConfigureHIDPollingRequest(const std::vector<u8>& request) {
if (request.size() != 3) { if (request.size() != 3) {
LOG_ERROR(Service_IR, "Wrong request size ({}): {}", request.size(), std::string request_string;
Common::ArrayToString(request.data(), request.size())); for (auto request_part : request)
request_string += fmt::format("{:02x} ", request_part);
LOG_ERROR(Service_IR, "Wrong request size ({}): {}", request.size(), request_string);
return; return;
} }
@ -188,8 +190,11 @@ void ExtraHID::HandleReadCalibrationDataRequest(const std::vector<u8>& request_b
"ReadCalibrationDataRequest has wrong size"); "ReadCalibrationDataRequest has wrong size");
if (request_buf.size() != sizeof(ReadCalibrationDataRequest)) { if (request_buf.size() != sizeof(ReadCalibrationDataRequest)) {
std::string request_buf_string;
for (auto request_buf_part : request_buf)
request_buf_string += fmt::format("{:02x} ", request_buf_part);
LOG_ERROR(Service_IR, "Wrong request size ({}): {}", request_buf.size(), LOG_ERROR(Service_IR, "Wrong request size ({}): {}", request_buf.size(),
Common::ArrayToString(request_buf.data(), request_buf.size())); request_buf_string);
return; return;
} }
@ -223,8 +228,10 @@ void ExtraHID::OnReceive(const std::vector<u8>& data) {
HandleReadCalibrationDataRequest(data); HandleReadCalibrationDataRequest(data);
break; break;
default: default:
LOG_ERROR(Service_IR, "Unknown request: {}", std::string data_string;
Common::ArrayToString(data.data(), data.size())); for (auto data_part : data)
data_string += fmt::format("{:02x} ", data_part);
LOG_ERROR(Service_IR, "Unknown request: {}", data_string);
break; break;
} }
} }

View File

@ -358,9 +358,9 @@ Movie::ValidationResult Movie::ValidateHeader(const CTMHeader& header, u64 progr
return ValidationResult::Invalid; return ValidationResult::Invalid;
} }
std::string revision = std::string revision;
Common::ArrayToString(header.revision.data(), header.revision.size(), 21, false); for (auto header_part : header.revision)
revision = Common::ToLower(revision); revision += fmt::format("{:02x}", header_part);
if (!program_id) if (!program_id)
Core::System::GetInstance().GetAppLoader().ReadProgramId(program_id); Core::System::GetInstance().GetAppLoader().ReadProgramId(program_id);