]> git.tuebingen.mpg.de Git - paraslash.git/commit
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)
commitc2396d21b32adec8a94bdae47d66bdc492779775
tree2e7a6c42f4ee8ef46bf3df87d77708ea78b72916
parent03def55569181393ca00cb08d19f6520f0c5ea93
Constify argument of playlist_open() and change_current_mood().

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.
afs.c
afs.h
mood.c
mood.h
playlist.c