Skip to content

Commit 8316062

Browse files
dmweverjere8184
andcommitted
Update libopenage/pathfinding/cost_field.cpp
Co-authored-by: jere8184 <jeremiahmorgan.bham@outlook.com>
1 parent b878671 commit 8316062

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

libopenage/pathfinding/cost_field.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,7 @@ bool CostField::stamp(size_t idx, cost_t cost, const time::time_t &stamped_at) {
6868
}
6969

7070
bool CostField::unstamp(size_t idx, const time::time_t &unstamped_at) {
71-
if (!this->cost_stamps[idx].has_value()) return false;
72-
if (unstamped_at < this->cost_stamps[idx]->stamp_time) return false;
71+
if (!this->cost_stamps[idx].has_value() || unstamped_at < this->cost_stamps[idx]->stamp_time) return false;
7372

7473
cost_t original_cost = cost_stamps[idx]->original_cost;
7574

0 commit comments

Comments
 (0)