bool abuse in path_encode()

Поиск
Список
Период
Сортировка
Искать

bool abuse in path_encode()

От:
Peter Eisentraut <peter_e@gmx.net>
Дата:
Вложения:
The function path_encode() in geo_ops.c takes an argument "bool closed",
to indicate an open or closed path --- but you can also pass -1 to
indicate "neither".  I propose to change this to an enum to make the
code clearer and less weird.

Re: bool abuse in path_encode()

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Peter Eisentraut  writes:
> The function path_encode() in geo_ops.c takes an argument "bool closed",
> to indicate an open or closed path --- but you can also pass -1 to
> indicate "neither".

Egad :-(.

> I propose to change this to an enum to make the
> code clearer and less weird.

Please change the "default" cases to be "case PATH_NONE", then.
		regards, tom lane


FAQ