Skip to content

Commit

Permalink
Revert "Fix cold data bug"
Browse files Browse the repository at this point in the history
This reverts commit ff00fd9.
  • Loading branch information
cesarBLG committed Sep 1, 2023
1 parent ff00fd9 commit f37f137
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions EVC/TrainSubsystems/cold_movement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ void save_cold_data(std::string field, json &value)
json load_cold_data(std::string field)
{
auto contents = platform->read_file("cold_data.json");
json j;
if (contents)
j = json::parse(*contents);
if (!contents)
return json();
json j = json::parse(*contents);
if (!j.contains(field)) j[field] = json();
return j[field];
}

0 comments on commit f37f137

Please sign in to comment.