mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
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:
@@ -457,7 +457,7 @@ AnalysisManager::AnalysisManager(std::string_view path, Settings& settings,
|
||||
throw FileReadingError(path);
|
||||
}
|
||||
|
||||
m_json = wpi::json::parse(fileBuffer->begin(), fileBuffer->end());
|
||||
m_json = wpi::json::parse(fileBuffer->GetCharBuffer());
|
||||
|
||||
WPI_INFO(m_logger, "Read {}", path);
|
||||
}
|
||||
@@ -475,7 +475,7 @@ AnalysisManager::AnalysisManager(std::string_view path, Settings& settings,
|
||||
throw FileReadingError(newPath);
|
||||
}
|
||||
|
||||
m_json = wpi::json::parse(fileBuffer->begin(), fileBuffer->end());
|
||||
m_json = wpi::json::parse(fileBuffer->GetCharBuffer());
|
||||
|
||||
WPI_INFO(m_logger, "Read {}", newPath);
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ static wpi::json GetJSON(std::string_view path, wpi::Logger& logger) {
|
||||
throw std::runtime_error(fmt::format("Unable to read: {}", path));
|
||||
}
|
||||
|
||||
wpi::json json = wpi::json::parse(fileBuffer->begin(), fileBuffer->end());
|
||||
wpi::json json = wpi::json::parse(fileBuffer->GetCharBuffer());
|
||||
WPI_INFO(logger, "Read frc-characterization JSON from {}", path);
|
||||
return json;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user