Skip to content

Commit

Permalink
fix: change debug level of field count mismatch to DL::Warn (#5558)
Browse files Browse the repository at this point in the history
* fix: too many fields during decay iteration is not error-worthy

Errors produce stack traces which can take a while, and so Debug Level `DL::Error` should be reserved for near-exceptional circumstances.

* style(autofix.ci): automated formatting

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
  • Loading branch information
OrenAudeles and autofix-ci[bot] authored Oct 10, 2024
1 parent b95ab81 commit 2ff8954
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/map.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2787,10 +2787,10 @@ void map::decay_fields_and_scent( const time_duration &amount )

if( to_proc > 0 ) {
cur_submap->field_count = cur_submap->field_count - to_proc;
dbg( DL::Error ) << "map::decay_fields_and_scent: submap at "
<< abs_sub + tripoint( smx, smy, 0 )
<< "has " << cur_submap->field_count - to_proc << "fields, but "
<< cur_submap->field_count << " field_count";
dbg( DL::Warn ) << "map::decay_fields_and_scent: submap at "
<< abs_sub + tripoint( smx, smy, 0 )
<< "has " << cur_submap->field_count - to_proc << "fields, but "
<< cur_submap->field_count << " field_count";
}
}
}
Expand Down

0 comments on commit 2ff8954

Please sign in to comment.