From c8e6c05334e4d08f5441c66530b7196a2fa8de36 Mon Sep 17 00:00:00 2001 From: Angen Date: Sat, 23 May 2020 12:21:49 +0000 Subject: [PATCH] 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. --- source/third_party/tinygettext/src/plural_forms.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/third_party/tinygettext/src/plural_forms.cpp b/source/third_party/tinygettext/src/plural_forms.cpp index 1254e2cb02..6fa76ed959 100644 --- a/source/third_party/tinygettext/src/plural_forms.cpp +++ b/source/third_party/tinygettext/src/plural_forms.cpp @@ -57,7 +57,7 @@ unsigned int plural4_cy(int n) { return static_cast((n==1) ? 0 : ( unsigned int plural4_gd(int n) { return static_cast(( 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((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(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(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(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(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(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(n==1 ? 0 : n==2 ? 1 : n<7 ? 2 : n<11 ? 3 : 4);}