mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-06-21 01:04:06 +00:00
Fix gcc warning reported by Imarok after 204e17206b
Introduced in 204e17206b.
Gcc gives warning about missing parenthesis so this patch is adding
them, not changing result of expression.
Fix proposed by Imarok in P206 after report on irc
http://irclogs.wildfiregames.com/2020-05/2020-05-22-QuakeNet-%230ad-dev.log.
Differential Revision: https://code.wildfiregames.com/D2762
Reviewed by: elexis
This was SVN commit r23692.
This commit is contained in:
+1
-1
@@ -57,7 +57,7 @@ unsigned int plural4_cy(int n) { return static_cast<unsigned int>((n==1) ? 0 : (
|
||||
unsigned int plural4_gd(int n) { return static_cast<unsigned int>(( n==1 || n==11) ? 0 : (n==2 || n==12) ? 1 : (n > 2 && n < 20) ? 2 : 3); }
|
||||
unsigned int plural4_he(int n) { return static_cast<unsigned int>((n == 1 && n % 1 == 0) ? 0 : (n == 2 && n % 1 == 0) ? 1: (n % 10 == 0 && n % 1 == 0 && n > 10) ? 2 : 3);}
|
||||
unsigned int plural4_lt(int n) { return static_cast<unsigned int>(n % 10 == 1 && (n % 100 > 19 || n % 100 < 11) ? 0 : (n % 10 >= 2 && n % 10 <=9) && (n % 100 > 19 || n % 100 < 11) ? 1 : n % 1 != 0 ? 2: 3);}
|
||||
unsigned int plural4_pl(int n) { return static_cast<unsigned int>(n==1 ? 0 : (n%10>=2 && n%10<=4) && (n%100<12 || n%100>14) ? 1 : n!=1 && (n%10>=0 && n%10<=1) || (n%10>=5 && n%10<=9) || (n%100>=12 && n%100<=14) ? 2 : 3);}
|
||||
unsigned int plural4_pl(int n) { return static_cast<unsigned int>(n == 1 ? 0 : (n % 10 >= 2 && n % 10 <= 4) && (n % 100 < 12 || n % 100 > 14) ? 1 : (n != 1 && (n % 10 >= 0 && n % 10 <= 1)) || (n % 10 >= 5 && n % 10 <= 9) || (n % 100 >= 12 && n % 100 <= 14) ? 2 : 3); }
|
||||
unsigned int plural4_sk(int n) { return static_cast<unsigned int>(n % 1 == 0 && n == 1 ? 0 : n % 1 == 0 && n >= 2 && n <= 4 ? 1 : n % 1 != 0 ? 2: 3);}
|
||||
unsigned int plural4_uk(int n) { return static_cast<unsigned int>(n % 1 == 0 && n % 10 == 1 && n % 100 != 11 ? 0 : n % 1 == 0 && n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 12 || n % 100 > 14) ? 1 : n % 1 == 0 && (n % 10 ==0 || (n % 10 >=5 && n % 10 <=9) || (n % 100 >=11 && n % 100 <=14 )) ? 2: 3);}
|
||||
unsigned int plural5_ga(int n) { return static_cast<unsigned int>(n==1 ? 0 : n==2 ? 1 : n<7 ? 2 : n<11 ? 3 : 4);}
|
||||
|
||||
Reference in New Issue
Block a user