Browse Source

minor reordering of switch- most common case first

master
5 years ago
parent
commit
e7c71570c7
  1. 6
      includes/dbquery.c

6
includes/dbquery.c

@ -13,15 +13,15 @@ static inline char *get_filename(char * const c) { @@ -13,15 +13,15 @@ static inline char *get_filename(char * const c) {
char *qout = "queries/mranks.sql";
if (c != NULL) {
switch(*c) {
default:
*c = QOVERVIEW;
break;
case QMLEADERBOARD:
qout = "queries/mleaderboard-ojoin.sql";
break;
case QRPLAYER:
qout = "queries/rplayers.sql";
break;
default:
*c = QOVERVIEW;
break;
}
}
return qout;

Loading…
Cancel
Save