Use char instead of uint8_t for json::parse (#5877)

The uint8_t usage causes warnings on newer clang versions.

Add GetCharBuffer() to MemoryBuffer classes to make this easy.
This commit is contained in:
Peter Johnson
2023-11-04 22:18:42 -07:00
committed by GitHub
parent ec1d261984
commit 14dcd0d26f
7 changed files with 23 additions and 12 deletions

View File

@@ -35,7 +35,7 @@ Trajectory TrajectoryUtil::FromPathweaverJson(std::string_view path) {
throw std::runtime_error(fmt::format("Cannot open file: {}", path));
}
wpi::json json = wpi::json::parse(fileBuffer->begin(), fileBuffer->end());
wpi::json json = wpi::json::parse(fileBuffer->GetCharBuffer());
return Trajectory{json.get<std::vector<Trajectory::State>>()};
}