Skip to content

Commit

Permalink
Drop redundant call in calc_trade_tonnage
Browse files Browse the repository at this point in the history
  • Loading branch information
CyberiaResurrection committed Nov 26, 2024
1 parent 8ee0d2b commit 87194cd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion PyRoute/Calculation/RouteCalculation.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ def get_btn_offset(distance):
return RouteCalculation.btn_jump_mod[jump_index]

@staticmethod
@functools.cache
def get_vol_offset(distance):
if distance < 50:
return 0
Expand Down Expand Up @@ -196,7 +197,7 @@ def calc_trade_tonnage(btn, distance):

if 0 > dton:
return 0
return RouteCalculation.calc_trade(max(0, dton))
return RouteCalculation.calc_trade(dton)

@staticmethod
@functools.cache
Expand Down

0 comments on commit 87194cd

Please sign in to comment.