mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +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:
@@ -137,9 +137,8 @@ static bool LoadWindowStorageImpl(const std::string& filename) {
|
||||
return false;
|
||||
} else {
|
||||
try {
|
||||
return JsonToWindow(
|
||||
wpi::json::parse(fileBuffer->begin(), fileBuffer->end()),
|
||||
filename.c_str());
|
||||
return JsonToWindow(wpi::json::parse(fileBuffer->GetCharBuffer()),
|
||||
filename.c_str());
|
||||
} catch (wpi::json::parse_error& e) {
|
||||
ImGui::LogText("Error loading %s: %s", filename.c_str(), e.what());
|
||||
return false;
|
||||
@@ -164,9 +163,8 @@ static bool LoadStorageRootImpl(Context* ctx, const std::string& filename,
|
||||
createdStorage = true;
|
||||
}
|
||||
try {
|
||||
storage->FromJson(
|
||||
wpi::json::parse(fileBuffer->begin(), fileBuffer->end()),
|
||||
filename.c_str());
|
||||
storage->FromJson(wpi::json::parse(fileBuffer->GetCharBuffer()),
|
||||
filename.c_str());
|
||||
} catch (wpi::json::parse_error& e) {
|
||||
ImGui::LogText("Error loading %s: %s", filename.c_str(), e.what());
|
||||
if (createdStorage) {
|
||||
|
||||
Reference in New Issue
Block a user