[wpiutil] MakeJByteArray: Use span<uint8> instead of string_view (#4446)

This commit is contained in:
Peter Johnson
2022-10-02 06:28:50 -07:00
committed by GitHub
parent 10e04e2b13
commit ceaf493811
5 changed files with 42 additions and 22 deletions

View File

@@ -62,9 +62,7 @@ Java_edu_wpi_first_hal_can_CANJNI_FRCNetCommCANSessionMuxReceiveMessage
if (!CheckCANStatus(env, status, *messageIDPtr)) {
return nullptr;
}
return MakeJByteArray(env,
std::string_view{reinterpret_cast<const char*>(buffer),
static_cast<size_t>(dataSize)});
return MakeJByteArray(env, {buffer, static_cast<size_t>(dataSize)});
}
/*