RA Leaderboards: comment fixes

//s to comment blocks
This commit is contained in:
celerizer 2017-11-11 19:58:08 -06:00 committed by GitHub
parent 6e8cb62cb8
commit b11922dd17
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -975,7 +975,7 @@ static int cheevos_parse_expression(cheevos_expr_t *expr, const char* mem)
if (*aux != '*') if (*aux != '*')
{ {
// expression has no multiplier /* expression has no multiplier */
if (*aux == '_') if (*aux == '_')
{ {
aux++; aux++;
@ -989,11 +989,11 @@ static int cheevos_parse_expression(cheevos_expr_t *expr, const char* mem)
i++; i++;
} }
// no multiplier at end of string /* no multiplier at end of string */
else if (*aux == '\0' || *aux == '"' || *aux == ',') else if (*aux == '\0' || *aux == '"' || *aux == ',')
return 0; return 0;
// invalid character in expression /* invalid character in expression */
else else
{ {
free((void*)expr->terms); free((void*)expr->terms);
@ -1179,7 +1179,7 @@ static void cheevos_format_value(const unsigned value, const unsigned type,
unsigned cheevos_parse_format(cheevos_field_t* format) unsigned cheevos_parse_format(cheevos_field_t* format)
{ {
//Most likely /* Most likely */
if (strncmp(format->string, "VALUE", format->length) == 0) if (strncmp(format->string, "VALUE", format->length) == 0)
return CHEEVOS_FORMAT_VALUE; return CHEEVOS_FORMAT_VALUE;
else if (strncmp(format->string, "TIME", format->length) == 0) else if (strncmp(format->string, "TIME", format->length) == 0)
@ -1187,13 +1187,13 @@ unsigned cheevos_parse_format(cheevos_field_t* format)
else if (strncmp(format->string, "SCORE", format->length) == 0) else if (strncmp(format->string, "SCORE", format->length) == 0)
return CHEEVOS_FORMAT_SCORE; return CHEEVOS_FORMAT_SCORE;
//Less likely /* Less likely */
else if (strncmp(format->string, "MILLISECS", format->length) == 0) else if (strncmp(format->string, "MILLISECS", format->length) == 0)
return CHEEVOS_FORMAT_MILLIS; return CHEEVOS_FORMAT_MILLIS;
else if (strncmp(format->string, "TIMESECS", format->length) == 0) else if (strncmp(format->string, "TIMESECS", format->length) == 0)
return CHEEVOS_FORMAT_SECS; return CHEEVOS_FORMAT_SECS;
//Rare (RPS only) /* Rare (RPS only) */
else if (strncmp(format->string, "POINTS", format->length) == 0) else if (strncmp(format->string, "POINTS", format->length) == 0)
return CHEEVOS_FORMAT_SCORE; return CHEEVOS_FORMAT_SCORE;
else if (strncmp(format->string, "FRAMES", format->length) == 0) else if (strncmp(format->string, "FRAMES", format->length) == 0)
@ -1799,7 +1799,7 @@ static int cheevos_expr_value(cheevos_expr_t* expr)
cheevos_term_t* term = expr->terms; cheevos_term_t* term = expr->terms;
unsigned i; unsigned i;
//Separate possible values with '$' operator, submit the largest /* Separate possible values with '$' operator, submit the largest */
unsigned current_value = 0; unsigned current_value = 0;
int values[expr->compare_count]; int values[expr->compare_count];
memset(values, 0, sizeof values); memset(values, 0, sizeof values);
@ -1907,8 +1907,9 @@ static void cheevos_test_leaderboards(void)
{ {
lboard->active = 0; lboard->active = 0;
if (value == 0) //failsafe for improper LBs if (value == 0)
{ {
/* failsafe for improper LBs */
RARCH_LOG("[CHEEVOS]: error: lboard %s tried to submit 0\n", lboard->title); RARCH_LOG("[CHEEVOS]: error: lboard %s tried to submit 0\n", lboard->title);
runloop_msg_queue_push("Leaderboard attempt cancelled!", 0, 2 * 60, false); runloop_msg_queue_push("Leaderboard attempt cancelled!", 0, 2 * 60, false);
} }