Opened 17 years ago

Last modified 16 years ago

#243 new Enhancement

Improve const-correctness

Reported by: elfring Owned by: davea
Priority: Minor Milestone: Undetermined
Component: Undetermined Version:
Keywords: const patch Cc:

Description

Would you like to apply the advices from a well-known article to more places in your source files?
I suggest to add the key word "const" to the type specifiers for parameters like the following.

Attachments (3)

243.diff.bz2 (5.6 KB) - added by elfring 16 years ago.
update suggestion
const.patch (2.3 KB) - added by Nicolas 16 years ago.
str-util-const.patch
243b.diff (48.2 KB) - added by elfring 15 years ago.
update suggestion

Download all attachments as: .zip

Change History (8)

comment:1 Changed 17 years ago by Nicolas

Component: BOINC - APIUndetermined
Owner: Bruce Allen deleted

Removing component, since this could apply to the whole BOINC codebase.

comment:2 Changed 17 years ago by elfring

Another example:
The icon "usage.xpm" for the client GUI was tagged as read-only already. Would you also like to apply this property to more pictures to avoid messages like the following?

res/warning.xpm:63: Warnung: deprecated conversion from string constant to »char*«

Changed 16 years ago by elfring

Attachment: 243.diff.bz2 added

update suggestion

comment:3 Changed 16 years ago by elfring

Keywords: const-correctness read-only data structures added

Would you like to reduce more warnings that I get during compilation by GCC 4.3.1?

comment:4 Changed 16 years ago by Nicolas

Keywords: const patch added; const-correctness read-only data structures removed

Changed 16 years ago by Nicolas

Attachment: const.patch added

str-util-const.patch

comment:5 Changed 16 years ago by romw

Milestone: 6.6Undetermined
Owner: set to davea

Changed 15 years ago by elfring

Attachment: 243b.diff added

update suggestion

Note: See TracTickets for help on using tickets.