mirror of
https://github.com/postgres/postgres.git
synced 2026-02-21 00:40:20 -05:00
Avoid direct use of INFINITY.
It's not very portable. Per buildfarm.
This commit is contained in:
parent
f941d03329
commit
12cc299c65
1 changed files with 5 additions and 4 deletions
|
|
@ -21,7 +21,8 @@
|
|||
|
||||
#include "lib/bipartite_match.h"
|
||||
#include "miscadmin.h"
|
||||
#include "utils/palloc.h"
|
||||
#include "utils/builtins.h"
|
||||
|
||||
|
||||
static bool hk_breadth_search(BipartiteMatchState *state);
|
||||
static bool hk_depth_search(BipartiteMatchState *state, int u, int depth);
|
||||
|
|
@ -87,7 +88,7 @@ hk_breadth_search(BipartiteMatchState *state)
|
|||
int qtail = 0; /* so don't have to worry about wrapping */
|
||||
int u;
|
||||
|
||||
distance[0] = INFINITY;
|
||||
distance[0] = get_float4_infinity();
|
||||
|
||||
for (u = 1; u <= usize; ++u)
|
||||
{
|
||||
|
|
@ -97,7 +98,7 @@ hk_breadth_search(BipartiteMatchState *state)
|
|||
queue[qhead++] = u;
|
||||
}
|
||||
else
|
||||
distance[u] = INFINITY;
|
||||
distance[u] = get_float4_infinity();
|
||||
}
|
||||
|
||||
while (qtail < qhead)
|
||||
|
|
@ -156,6 +157,6 @@ hk_depth_search(BipartiteMatchState *state, int u, int depth)
|
|||
}
|
||||
}
|
||||
|
||||
distance[u] = INFINITY;
|
||||
distance[u] = get_float4_infinity();
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue