Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit12cc299

Browse files
committed
Avoid direct use of INFINITY.
It's not very portable. Per buildfarm.
1 parentf941d03 commit12cc299

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

‎src/backend/lib/bipartite_match.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121

2222
#include"lib/bipartite_match.h"
2323
#include"miscadmin.h"
24-
#include"utils/palloc.h"
24+
#include"utils/builtins.h"
25+
2526

2627
staticboolhk_breadth_search(BipartiteMatchState*state);
2728
staticboolhk_depth_search(BipartiteMatchState*state,intu,intdepth);
@@ -87,7 +88,7 @@ hk_breadth_search(BipartiteMatchState *state)
8788
intqtail=0;/* so don't have to worry about wrapping */
8889
intu;
8990

90-
distance[0]=INFINITY;
91+
distance[0]=get_float4_infinity();
9192

9293
for (u=1;u <=usize;++u)
9394
{
@@ -97,7 +98,7 @@ hk_breadth_search(BipartiteMatchState *state)
9798
queue[qhead++]=u;
9899
}
99100
else
100-
distance[u]=INFINITY;
101+
distance[u]=get_float4_infinity();
101102
}
102103

103104
while (qtail<qhead)
@@ -156,6 +157,6 @@ hk_depth_search(BipartiteMatchState *state, int u, int depth)
156157
}
157158
}
158159

159-
distance[u]=INFINITY;
160+
distance[u]=get_float4_infinity();
160161
return false;
161162
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp