优化执行结点

This commit is contained in:
boyce
2025-10-05 14:56:37 +08:00
parent 654426a836
commit 640b61bcdb
3 changed files with 11 additions and 5 deletions

View File

@@ -408,7 +408,6 @@ func (em *RangeCompare) GetName() string {
}
func (em *RangeCompare) Exec() (int, error) {
inPortA := em.GetInPort(1)
if inPortA == nil {
return -1, fmt.Errorf("GreaterThanInteger inParam 1 not found")
@@ -424,8 +423,8 @@ func (em *RangeCompare) Exec() (int, error) {
return 0, nil
}
for i := range intArray {
if intArray[i] <= ret {
for i := 0; i < len(intArray) && i < em.GetOutPortCount()-2; i++ {
if ret <= intArray[i] {
return i + 2, nil
}
}