Skip to content

Commit 46958e5

Browse files
authored
Merge pull request #7168 from erik-krogh/useMinInsteadofRank1
ATM: use min() instead of rank[1]
2 parents 6815a13 + 2af7817 commit 46958e5

File tree

1 file changed

+2
-2
lines changed
  • javascript/ql/experimental/adaptivethreatmodeling/lib/experimental/adaptivethreatmodeling

1 file changed

+2
-2
lines changed

javascript/ql/experimental/adaptivethreatmodeling/lib/experimental/adaptivethreatmodeling/EndpointScoring.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ DatabaseFeatures::Entity getRepresentativeEntityForEndpoint(DataFlow::Node endpo
5454
// Use the largest entity smaller than the AST node limit, resolving ties using the entity that
5555
// appears first in the source archive.
5656
result =
57-
rank[1](DatabaseFeatures::Entity entity, int numAstNodes, Location l |
57+
min(DatabaseFeatures::Entity entity, int numAstNodes, Location l |
5858
entity = EndpointToEntity::getAnEntityForEndpoint(endpoint) and
5959
numAstNodes = getNumAstNodesInEntity(entity) and
6060
numAstNodes <= getMaxNumAstNodes() and
@@ -68,7 +68,7 @@ DatabaseFeatures::Entity getRepresentativeEntityForEndpoint(DataFlow::Node endpo
6868
// Use the smallest entity, resolving ties using the entity that
6969
// appears first in the source archive.
7070
result =
71-
rank[1](DatabaseFeatures::Entity entity, int numAstNodes, Location l |
71+
min(DatabaseFeatures::Entity entity, int numAstNodes, Location l |
7272
entity = EndpointToEntity::getAnEntityForEndpoint(endpoint) and
7373
numAstNodes = getNumAstNodesInEntity(entity) and
7474
l = entity.getLocation()

0 commit comments

Comments
 (0)