Skip to content

Commit

Permalink
fix([trash collection]): fix wrong return value
Browse files Browse the repository at this point in the history
  • Loading branch information
HarukiMoriarty committed Jun 17, 2024
1 parent ca19150 commit d4c8e0e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion calmapf/src/cache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ CacheAccessResult Cache::try_insert_cache(Vertex* cargo, Vertex* unloading_port)

// First, if cargo has already cached or is coming on the way, we directly go
// to unloading port, for simplify, we just check cache group here
if (_get_cargo_in_cache_position(cargo) != -2 || _is_cargo_in_coming_cache(cargo)) return CacheAccessResult(false, nullptr);
if (_get_cargo_in_cache_position(cargo) != -2 || _is_cargo_in_coming_cache(cargo)) return CacheAccessResult(false, unloading_port);

// Second try to find a empty position to insert cargo
for (uint i = 0; i < is_empty[group].size(); i++) {
Expand Down

0 comments on commit d4c8e0e

Please sign in to comment.