Removed unused cost variable (#3245)

* Removed unused cost variable

* Removed unused cost variable for maxIndex
This commit is contained in:
vMajx 2025-01-19 15:55:56 +11:00 committed by GitHub
parent 16d6d43ebf
commit 77ae270b4e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -847,7 +847,6 @@ e2function number table:maxIndex()
local largest = nil local largest = nil
local index = 0 local index = 0
for k,v in pairs( this.n ) do for k,v in pairs( this.n ) do
cost = cost + 1
if (this.ntypes[k] == "n") then if (this.ntypes[k] == "n") then
if (largest == nil or v > largest) then if (largest == nil or v > largest) then
largest = v largest = v
@ -865,7 +864,6 @@ e2function number table:minIndex()
local smallest = nil local smallest = nil
local index = 0 local index = 0
for k,v in pairs( this.n ) do for k,v in pairs( this.n ) do
cost = cost + 1
if (this.ntypes[k] == "n") then if (this.ntypes[k] == "n") then
if (smallest == nil or v < smallest) then if (smallest == nil or v < smallest) then
smallest = v smallest = v