mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-20 16:14:58 +01:00
fix: make the odometer test's scratch directory in the build directory for CI
Sonar (S5443) flags the shared temporary directory; the tests now use one in their working directory. Also makes the scratch directory non-copyable and spells out the optional checks Sonar asked about.
This commit is contained in:
@@ -153,9 +153,9 @@ double guessed_state(std::string const &Vehicle) {
|
||||
|
||||
reading starting_state(store const &States, std::string const &Vehicle, std::filesystem::path const &Vehicledirectory) {
|
||||
reading result;
|
||||
if (auto const saved{States.find(Vehicle)}) {
|
||||
if (auto const saved{States.find(Vehicle)}; saved.has_value()) {
|
||||
result.begin(*saved, origin::saved);
|
||||
} else if (auto const legacy{legacy_state(Vehicledirectory, Vehicle)}) {
|
||||
} else if (auto const legacy{legacy_state(Vehicledirectory, Vehicle)}; legacy.has_value()) {
|
||||
result.begin(*legacy, origin::legacy);
|
||||
} else {
|
||||
result.begin(guessed_state(Vehicle), origin::guessed);
|
||||
|
||||
Reference in New Issue
Block a user