Opened 19 years ago

Last modified 17 years ago

#1236 new defect

[PATCH] allow 'const' strings to be passed to msGetCharacterSize() + fix a warning

Reported by: pere@… Owned by: mapserverbugs
Priority: high Milestone:
Component: Build Problems Version: 4.4
Severity: minor Keywords:
Cc: sdlime

Description (last modified by hobu)

The function msGetCharacterSize() should be able to accept const
strings as the font specifier.  Especially since it at the moment is
passing it to gdImageStringFT(), which only read the string and don't
write to it.  At the moment, the 'constness' is removed in at least
one place.  This patch move this 'constness' removal from
msGetMarkerSize() to msGetCharacterSize() in preparation for libgd to
fix the prototype of gdImageStringFT().

The code should also use floating point values as the ptsize and angle
argument when calling gdImageStringFT(), to make sure the variables
matchines the type of the recieving function.

This patch fixes these two issues.

This patch reduces the number warnings when compiling the source with
lots of warning flags enabled.

Attachments (1)

charsize-font-const.diff (2.8 KB ) - added by pere@… 19 years ago.
patch for msGetCharacterSize()

Download all attachments as: .zip

Change History (2)

by pere@…, 19 years ago

Attachment: charsize-font-const.diff added

patch for msGetCharacterSize()

comment:1 by hobu, 17 years ago

Cc: sdlime added
Description: modified (diff)

Adding Steve to see if we can easily squish this one...

Note: See TracTickets for help on using tickets.