Why do some unused functions exist in the code?
Frank Warmerdam
fwarmerdam at GMAIL.COM
Wed Jan 26 09:47:05 EST 2005
On Wed, 26 Jan 2005 10:26:27 +0100, Petter Reinholdtsen <pere at hungry.com> wrote:
> When going through the source, and flagging all functions not used in
> other files as 'static', and moving prototypes for all functions used
> in other files into an appropriate header file, there is a class of
> functions left. The ones decleared in a file and never used. Why are
> these functions in the source?
>
> The following functions are only mentioned once and never used:
>
> bufferPolyline checkWebExtent loadStyleString msCopyItem
> msCopyLabelCache msCopyLine msCopyResultCache msLayerWhichItemsNew
> msPolygonDirection msPrintShape msWebDebug
>
> Are they part of some public API or otherwise used?
Petter,
I believe that essentially none of these are used. Some of them were once
used, and aren't now and some were written with the expectation they would
be needed. A few might be used in special circumstances.
I thought I had removed msWebDebug() before the 4.4 release,
but I see I didn't. I'll take care of that one.
In general, I think removing this cruft isn't worth the risk of breaking
something.
Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | Geospatial Programmer for Rent
More information about the mapserver-dev
mailing list