Skip to content

Improve const-correctness #44

Description

@elfring

💭 I suggest to add the key word “const” to the type specifiers for a few parameters in functions like the following.

  • filename

    libcue/cd.h

    Lines 45 to 46 in 7176a1f

    /* filename of data file */
    void track_set_filename(Track *track, char *filename);
  • value

    libcue/cdtext.h

    Lines 28 to 29 in 7176a1f

    /* set CD-TEXT field to value for PTI pti */
    void cdtext_set(int pti, char *value, Cdtext *cdtext);

Would you like to apply the advices from an article to more places in your source files?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions