mirror of
https://github.com/postgres/postgres.git
synced 2025-11-28 11:44:57 +03:00
Cleanup various comparisons with the constant "true".
Itagaki Takahiro, with slight modifications.
This commit is contained in:
@@ -3903,7 +3903,7 @@ lseg_inside_poly(Point *a, Point *b, POLYGON *poly, int start)
|
||||
t.p[1] = *b;
|
||||
s.p[0] = poly->p[(start == 0) ? (poly->npts - 1) : (start - 1)];
|
||||
|
||||
for (i = start; i < poly->npts && res == true; i++)
|
||||
for (i = start; i < poly->npts && res; i++)
|
||||
{
|
||||
Point *interpt;
|
||||
|
||||
@@ -3979,7 +3979,7 @@ poly_contain(PG_FUNCTION_ARGS)
|
||||
s.p[0] = polyb->p[polyb->npts - 1];
|
||||
result = true;
|
||||
|
||||
for (i = 0; i < polyb->npts && result == true; i++)
|
||||
for (i = 0; i < polyb->npts && result; i++)
|
||||
{
|
||||
s.p[1] = polyb->p[i];
|
||||
result = lseg_inside_poly(s.p, s.p + 1, polya, 0);
|
||||
|
||||
@@ -109,7 +109,7 @@ find_wordentry(TSVector t, TSQuery q, QueryOperand *item, int32 *nitem)
|
||||
StopHigh = StopMiddle;
|
||||
}
|
||||
|
||||
if (item->prefix == true)
|
||||
if (item->prefix)
|
||||
{
|
||||
if (StopLow >= StopHigh)
|
||||
StopMiddle = StopHigh;
|
||||
|
||||
@@ -625,7 +625,7 @@ checkcondition_str(void *checkval, QueryOperand *val)
|
||||
StopHigh = StopMiddle;
|
||||
}
|
||||
|
||||
if (res == false && val->prefix == true)
|
||||
if (!res && val->prefix)
|
||||
{
|
||||
/*
|
||||
* there was a failed exact search, so we should scan further to find
|
||||
|
||||
Reference in New Issue
Block a user