Ticket #243 (new Enhancement)

Opened 1 year ago

Last modified 2 months ago

Improve const-correctness

Reported by: elfring Assigned to:
Priority: Minor Milestone: 6.4
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.
- string (functions "txfRenderString", "txfRenderFancyString")
- name (function "read_tga_texture")
- dir (function "txf_load_fonts")
- s (function "txf_render_string")
- N, label (global variables)

Attachments

243.diff.bz2 (5.6 kB) - added by elfring on 06/27/08 00:41:25.
update suggestion
const.patch (2.3 kB) - added by Nicolas on 07/02/08 09:55:29.
str-util-const.patch

Change History

10/01/07 14:38:38 changed by Nicolas

  • owner deleted.
  • component changed from BOINC - API to Undetermined.

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

10/18/07 07:14:54 changed 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*«

06/27/08 00:41:25 changed by elfring

  • attachment 243.diff.bz2 added.

update suggestion

06/27/08 00:46:04 changed by elfring

  • keywords set to const-correctness, read-only data structures.

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

07/02/08 09:34:09 changed by Nicolas

  • keywords changed from const-correctness, read-only data structures to const patch.

07/02/08 09:55:29 changed by Nicolas

  • attachment const.patch added.

str-util-const.patch


If this page is incomplete or incorrect, please edit it or add it to the wiki to-do list. To do this, you must be logged in; click Login or Register above.