]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
Constify argument of playlist_open() and change_current_mood().
authorAndre Noll <maan@tuebingen.mpg.de>
Mon, 21 Mar 2016 22:17:22 +0000 (22:17 +0000)
committerAndre Noll <maan@tuebingen.mpg.de>
Sun, 8 May 2016 12:29:27 +0000 (14:29 +0200)
The only reason these arguments are not const is that we create an
osl object out of it, which contains a non-constant data pointer.

The osl library functions we call here will not touch this memory,
so it's safe to let both functions take a const pointer and cast it at
initialization of the non-constant ->data pointer of struct osl object.

The single caller of each function is activate_mood_or_playlist()
whose argument can now also me made to point to constant memory.

Finally, the arg pointer of com_select_callback() is passed to
activate_mood_or_playlist(), so the variable can be of type const
char * as well.


No differences found