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

Commit2d97f16

Browse files
committed
Refactor and bug fix.
1 parentca6cfa8 commit2d97f16

File tree

10 files changed

+188
-175
lines changed

10 files changed

+188
-175
lines changed

‎box.c‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ sbox_circle_pos(const SCIRCLE *sc, const SBOX *sb)
172172
((sc->center.lat+sc->radius) <=sb->ne.lat)&&
173173
((sc->center.lat-sc->radius) >=sb->sw.lat);
174174
boolbcc=sbox_cont_point(sb,&sc->center);
175-
boolccb=FALSE;
175+
boolccb=false;
176176
int8pw,
177177
pe;
178178
SLinebw,
@@ -218,8 +218,8 @@ sbox_circle_pos(const SCIRCLE *sc, const SBOX *sb)
218218
}
219219
if (bcc&&lat_b_cont_c)
220220
{
221-
booltouw=FALSE,
222-
toue=FALSE;
221+
booltouw=false,
222+
toue=false;
223223

224224
if (pw==PGS_CIRCLE_LINE_OVER)
225225
{
@@ -804,7 +804,7 @@ sbox_box_pos(const SBOX *b1, const SBOX *b2, bool recheck)
804804

805805
if (!recheck)
806806
{
807-
pe=sbox_box_pos(b2,b1,TRUE);
807+
pe=sbox_box_pos(b2,b1,true);
808808
if (pe==PGS_BOX_CONT)
809809
{
810810
returnPGS_BOX_OVER;
@@ -1503,7 +1503,7 @@ spherebox_cont_box(PG_FUNCTION_ARGS)
15031503
SBOX*box1= (SBOX*)PG_GETARG_POINTER(0);
15041504
SBOX*box2= (SBOX*)PG_GETARG_POINTER(1);
15051505

1506-
PG_RETURN_BOOL(sbox_box_pos(box1,box2,FALSE)==PGS_BOX_CONT);
1506+
PG_RETURN_BOOL(sbox_box_pos(box1,box2,false)==PGS_BOX_CONT);
15071507
}
15081508

15091509
Datum
@@ -1512,7 +1512,7 @@ spherebox_cont_box_neg(PG_FUNCTION_ARGS)
15121512
SBOX*box1= (SBOX*)PG_GETARG_POINTER(0);
15131513
SBOX*box2= (SBOX*)PG_GETARG_POINTER(1);
15141514

1515-
PG_RETURN_BOOL(!(sbox_box_pos(box1,box2,FALSE)==PGS_BOX_CONT));
1515+
PG_RETURN_BOOL(!(sbox_box_pos(box1,box2,false)==PGS_BOX_CONT));
15161516
}
15171517

15181518
Datum
@@ -1521,7 +1521,7 @@ spherebox_cont_box_com(PG_FUNCTION_ARGS)
15211521
SBOX*box1= (SBOX*)PG_GETARG_POINTER(1);
15221522
SBOX*box2= (SBOX*)PG_GETARG_POINTER(0);
15231523

1524-
PG_RETURN_BOOL(sbox_box_pos(box1,box2,FALSE)==PGS_BOX_CONT);
1524+
PG_RETURN_BOOL(sbox_box_pos(box1,box2,false)==PGS_BOX_CONT);
15251525
}
15261526

15271527
Datum
@@ -1530,7 +1530,7 @@ spherebox_cont_box_com_neg(PG_FUNCTION_ARGS)
15301530
SBOX*box1= (SBOX*)PG_GETARG_POINTER(1);
15311531
SBOX*box2= (SBOX*)PG_GETARG_POINTER(0);
15321532

1533-
PG_RETURN_BOOL(!(sbox_box_pos(box1,box2,FALSE)==PGS_BOX_CONT));
1533+
PG_RETURN_BOOL(!(sbox_box_pos(box1,box2,false)==PGS_BOX_CONT));
15341534
}
15351535

15361536
Datum
@@ -1539,7 +1539,7 @@ spherebox_overlap_box(PG_FUNCTION_ARGS)
15391539
SBOX*box1= (SBOX*)PG_GETARG_POINTER(0);
15401540
SBOX*box2= (SBOX*)PG_GETARG_POINTER(1);
15411541

1542-
PG_RETURN_BOOL(sbox_box_pos(box1,box2,FALSE)>PGS_BOX_AVOID);
1542+
PG_RETURN_BOOL(sbox_box_pos(box1,box2,false)>PGS_BOX_AVOID);
15431543
}
15441544

15451545
Datum
@@ -1548,5 +1548,5 @@ spherebox_overlap_box_neg(PG_FUNCTION_ARGS)
15481548
SBOX*box1= (SBOX*)PG_GETARG_POINTER(0);
15491549
SBOX*box2= (SBOX*)PG_GETARG_POINTER(1);
15501550

1551-
PG_RETURN_BOOL(sbox_box_pos(box1,box2,FALSE)==PGS_BOX_AVOID);
1551+
PG_RETURN_BOOL(sbox_box_pos(box1,box2,false)==PGS_BOX_AVOID);
15521552
}

‎circle.c‎

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -208,15 +208,15 @@ spherecircle_in_circle(PG_FUNCTION_ARGS)
208208

209209
if (scircle_eq(c1,c2))
210210
{
211-
PG_RETURN_BOOL(TRUE);
211+
PG_RETURN_BOOL(true);
212212
}
213213
elseif (FPle((dist+c1->radius),c2->radius))
214214
{
215-
PG_RETURN_BOOL(TRUE);
215+
PG_RETURN_BOOL(true);
216216
}
217217
else
218218
{
219-
PG_RETURN_BOOL(FALSE);
219+
PG_RETURN_BOOL(false);
220220
}
221221
}
222222

@@ -229,15 +229,15 @@ spherecircle_in_circle_neg(PG_FUNCTION_ARGS)
229229

230230
if (scircle_eq(c1,c2))
231231
{
232-
PG_RETURN_BOOL(FALSE);
232+
PG_RETURN_BOOL(false);
233233
}
234234
elseif (FPgt((dist+c1->radius),c2->radius))
235235
{
236-
PG_RETURN_BOOL(TRUE);
236+
PG_RETURN_BOOL(true);
237237
}
238238
else
239239
{
240-
PG_RETURN_BOOL(FALSE);
240+
PG_RETURN_BOOL(false);
241241
}
242242
}
243243

@@ -250,15 +250,15 @@ spherecircle_in_circle_com(PG_FUNCTION_ARGS)
250250

251251
if (scircle_eq(c1,c2))
252252
{
253-
PG_RETURN_BOOL(TRUE);
253+
PG_RETURN_BOOL(true);
254254
}
255255
elseif (FPle((dist+c1->radius),c2->radius))
256256
{
257-
PG_RETURN_BOOL(TRUE);
257+
PG_RETURN_BOOL(true);
258258
}
259259
else
260260
{
261-
PG_RETURN_BOOL(FALSE);
261+
PG_RETURN_BOOL(false);
262262
}
263263
}
264264

@@ -271,15 +271,15 @@ spherecircle_in_circle_com_neg(PG_FUNCTION_ARGS)
271271

272272
if (scircle_eq(c1,c2))
273273
{
274-
PG_RETURN_BOOL(FALSE);
274+
PG_RETURN_BOOL(false);
275275
}
276276
elseif (FPgt((dist+c1->radius),c2->radius))
277277
{
278-
PG_RETURN_BOOL(TRUE);
278+
PG_RETURN_BOOL(true);
279279
}
280280
else
281281
{
282-
PG_RETURN_BOOL(FALSE);
282+
PG_RETURN_BOOL(false);
283283
}
284284
}
285285

@@ -292,15 +292,15 @@ spherecircle_overlap(PG_FUNCTION_ARGS)
292292

293293
if (scircle_eq(c1,c2))
294294
{
295-
PG_RETURN_BOOL(TRUE);
295+
PG_RETURN_BOOL(true);
296296
}
297297
elseif (FPlt((c1->radius+c2->radius),dist))
298298
{
299-
PG_RETURN_BOOL(FALSE);
299+
PG_RETURN_BOOL(false);
300300
}
301301
else
302302
{
303-
PG_RETURN_BOOL(TRUE);
303+
PG_RETURN_BOOL(true);
304304
}
305305
}
306306

@@ -313,15 +313,15 @@ spherecircle_overlap_neg(PG_FUNCTION_ARGS)
313313

314314
if (scircle_eq(c1,c2))
315315
{
316-
PG_RETURN_BOOL(FALSE);
316+
PG_RETURN_BOOL(false);
317317
}
318318
elseif (FPge((c1->radius+c2->radius),dist))
319319
{
320-
PG_RETURN_BOOL(FALSE);
320+
PG_RETURN_BOOL(false);
321321
}
322322
else
323323
{
324-
PG_RETURN_BOOL(TRUE);
324+
PG_RETURN_BOOL(true);
325325
}
326326
}
327327

‎crossmatch.c‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@
4040
#include"utils/lsyscache.h"
4141
#include"utils/rel.h"
4242

43+
#ifPG_VERSION_NUM >=90600
44+
#defineheap_formtuple heap_form_tuple
45+
#endif
46+
4347
/*
4448
* Pair of pages for pending scan.
4549
*/

‎ellipse.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -617,11 +617,11 @@ sellipse_cont_point(const SELLIPSE *se, const SPoint *sp)
617617
a=sellipse_dist(se->rad[0],se->rad[1],e);
618618
if (FPge(a,dist))
619619
{
620-
returnTRUE;
620+
returntrue;
621621
}
622622
else
623623
{
624-
returnFALSE;
624+
returnfalse;
625625
}
626626
}
627627
return false;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp