mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-23 01:59:43 +01:00
Fix up style in parseComments
This does the following: - Wrap lines that are too long (around 80 columns) - Place the asterisk with the type instead of the variable name
This commit is contained in:
parent
6dd9200503
commit
27e04e9dbf
1 changed files with 8 additions and 6 deletions
|
@ -477,14 +477,15 @@ end:
|
|||
}
|
||||
|
||||
/* Lifted from SDL_mixer, we used it in 2.3 and previous */
|
||||
static void parseComments(MusicTrack* t, char** comments, int comment_list_length)
|
||||
{
|
||||
static void parseComments(
|
||||
MusicTrack* t, char** comments, const int comment_list_length
|
||||
) {
|
||||
int loopend = 0;
|
||||
for (int i = 0; i < comment_list_length; i++)
|
||||
{
|
||||
char *param = SDL_strdup(comments[i]);
|
||||
char *argument = param;
|
||||
char *value = SDL_strchr(param, '=');
|
||||
char* param = SDL_strdup(comments[i]);
|
||||
char* argument = param;
|
||||
char* value = SDL_strchr(param, '=');
|
||||
if (value == NULL)
|
||||
{
|
||||
value = param + SDL_strlen(param);
|
||||
|
@ -498,7 +499,8 @@ end:
|
|||
* string if it is present at position 4. */
|
||||
char buf[5];
|
||||
SDL_strlcpy(buf, argument, sizeof(buf));
|
||||
if (SDL_strcasecmp(buf, "LOOP") == 0 && ((argument[4] == '_') || (argument[4] == '-')))
|
||||
if (SDL_strcasecmp(buf, "LOOP") == 0
|
||||
&& ((argument[4] == '_') || (argument[4] == '-')))
|
||||
{
|
||||
SDL_memmove(argument + 4, argument + 5, SDL_strlen(argument) - 4);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue