1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-12-22 17:49: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:
Misa 2022-11-13 19:27:58 -08:00
parent 6dd9200503
commit 27e04e9dbf

View file

@ -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);
}